eclipse git(EGIT)中的确切提取是什么? [英] What does exactly fetch does in eclipse git (EGIT)?
问题描述
--------------- ----------------------------- master
\ -------------- --------- miguel
\ --------------------------- jhonny
Miguel和我跟踪了我们本地回购中的所有分行。让我们说Miguel承诺并推动他的brash到github回购。我希望有米格尔推动本地。如果我抓取,会发生什么?获取只是更新远程回购参考?在这种情况下来源。
如果您认为这是重复的,请投票。但我无法找到答案林寻找尚未。
问候。
是的, git fetch
只会更新远程回购的本地副本(即远程引用) - 它不会以这种方式将这些更新合并到本地分支中 git pull
。
从这个意义上讲, git fetch
是非常'安全的',因为没有合并问题,你所有的本地分支都保持不变。有关更详细的讨论,请参阅:' git pull'和'git fetch'?
如果在 git fetch
之后,您确实想要合并远程更改与本地分支,然后您需要运行 git merge
。这实际上是 git pull
所做的。
In git documentation says fetch doesnt merge with your working tree. So lets say I have these branches: master, jhonny and miguel. Let's say master is for the last production code release.
--------------------------------------------master
\-----------------------miguel
\---------------------------jhonny
Miguel and I have tracking of all branches in our local repo. Lets say Miguel commit and push his brach to the github repo. I want to have the miguel push localy. If I do fetch, what will happen? Does fetch just updates the remote repo reference? Origin in this case.
Vote down if you think this is duplicated. But I couldnt find the answer Im looking for yet.
Regards.
Yes, git fetch
only updates the local copy of the remote repo (i.e. the remote reference) - it doesn't then merge those updates into the local branch the way git pull
does.
In this sense, git fetch
is quite 'safe' as there are no merge issues and all of your local branches remain untouched. For a more detailed discussion, see: What is the difference between 'git pull' and 'git fetch'?
If after a git fetch
you do want to merge the remote changes with the local branch, you then need to run a git merge
. This is in effect what git pull
does.
这篇关于eclipse git(EGIT)中的确切提取是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!