'git remote update','git fetch'和'git pull'有什么区别? [英] What is the difference between 'git remote update', 'git fetch' and 'git pull'?
问题描述
现在我开始玩Git了,而且我有点困惑。对我而言,看起来有很多选项可以做同样的事情。现在我的问题是下面的命令有什么不同:
还有哪一个更适用于更新本地副本一个远程分支?
git fetch
将只更新您的分支',但不会合并任何更改。
git pull
会更新和合并当前分支的任何远程更改。这将是您用来更新本地分行的人。
I'm starting to play with Git now and I'm a little bit confused. For me, looks like there are a lot of options to do the same thing. My question for now is what is the difference between the commands below:
- git remote update
- git fetch
- git pull
Also which one is more applicable for update a local copy of a remote branch?
git remote update
will update all of your branches set to track remote ones, but not merge any changes in.
git fetch
will update only the branch you're on, but not merge any changes in.
git pull
will update and merge any remote changes of the current branch you're on. This would be the one you use to update a local branch.
这篇关于'git remote update','git fetch'和'git pull'有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!