EGIT分支本地与远程跟踪 [英] EGIT branches local vs Remote tracking
问题描述
我是GIT新手。我使用EGIT和eclipse。
我有一个关于分支的问题,我在这里看到两个部分本地和远程跟踪。如果我必须在其中一个分支上工作,我认为有两种方法可以实现它。
a)在远程跟踪下查看origin / featureBranch并开始工作它。
b)右键单击本地并创建一个本地分支并指向ref / remote / featureBranch并开始使用它?
这两种方法有什么不同吗?哪一个是首选?
b)将会是最好的。
a)会创建一个删除头,这将允许您在匿名分支上工作,但不会让你推动你的工作。
(另见 Git每周提示:Detached Heads 和分离的头说明更多关于分离的头)
对于EGit,请参阅:
I am new to GIT. I use EGIT with eclipse.
I have a question about branches where I see two sections "Local" and "Remote Tracking". If I have to work on one of the branches, I think there are two ways I can accomplish it.
a) Check out origin/featureBranch under remote tracking and work on it.
b) Right click under local and create a local branch and point to ref/remote/featureBranch and start working on it?
Are there any difference between these two approaches? which one is preferred?
b) would be best.
a) would create a DETACHED HEAD, which would allow you to work on an "anonymous" branch, but would not allow you to push your work.
(See also "Git Tip of the Week: Detached Heads" and "detached head explained" for more on detached head)
For EGit, see "Git Lesson: Be mindful of a detached head":
这篇关于EGIT分支本地与远程跟踪的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!