Eclipse Egit。结帐会创建新的提交。为什么? [英] Eclipse Egit. Checkout creates new commit. Why?
问题描述
据我了解GIT,当我检查提交时,我应该将它的文件复制到我的工作目录中,但不应出现新的提交。虽然当我使用EGit并提交签出时,我会在reflog中看到新的提交。为什么?据我了解,checkout不应该创建新的提交。在这里我右键点击提交并选择结账
和 toniedzwiedz的回答):
- 告诉历史记录视图应显示哪些历史记录:e。 G。 在 Git存储库 视图右键单击存储库并选择: 显示>历史记录 。
- 在历史记录视图中启用选项显示所有分支和标签 视图工具栏)。否则,只显示当前分支的提交。
As I understand GIT, when I checkout on commit, I should get its files copy in my work directory, but no new commit should appear. Though when I use EGit and checkout on commit I see new commit in reflog. Why? As I understand checkout should not create new commit. Right?
Here I right click on commit and choose checkout
Then I get new commit in reflog:
So now I have few commits in my local master, but I never asked to do them.
Git integration for Eclipse - Task focused interface 4.6.1.201703071140-r org.eclipse.egit.mylyn.feature.group Eclipse EGit
You have to work with the History view instead of with the Git Reflog view (see git reflog and toniedzwiedz's answer for details):
- Tell the History view which history should be shown: e. g. in Git Repositories view right-click a repository and choose: Show In > History.
- In the History view enable the option Show All Branches and Tags (right button in the view toolbar). Otherwise, only commits of the current branch are displayed.
这篇关于Eclipse Egit。结帐会创建新的提交。为什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!