'git remote update','git fetch'和'git pull'有什么区别?

大卫·加西亚

我现在开始玩Git,我有些困惑。对我来说,看起来有很多选择可以做同样的事情。我现在的问题是以下命令之间的区别是什么:

  • git远程更新
  • git获取
  • git pull

还有哪一个更适用于更新远程分支的本地副本?

git remote update 将更新您的所有分支集以跟踪远程分支,但不合并任何更改。

git fetch 只会更新您所在的分支,而不会合并其中的任何更改。

git pull将更新合并您当前所在分支的所有远程更改。这将是您用来更新本地分支的那个。

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章

'git pull'和'git fetch'有什么区别?

git pull和git fetch + rebase有什么区别

git pull和git fetch + git rebase有什么区别?

git pull,git fetch和git rebase有什么区别?

git remote update和fetch之间的区别?

“ git pull origin”和“ git pull remote”有什么区别?

git -q pull和git pull有什么区别?

“ git fetch <url>”和“ git add remote remote <url>”后跟“ git fetch上行”有什么区别?

git fetch 和 git fetch origin 有什么区别

TortoiseGit:“ Git Sync”,“ Fetch”和“ Pull”之间有什么区别?

“ git add -A”和“ git add --update:/”有什么区别?

git remote prune,git prune,git fetch --prune等有什么区别

git中的pull和clone有什么区别?

git clone --mirror和pull有什么区别

git fetch origin和git fetch git://127.0.0.1/之间有什么区别

git命令中的“ origin”和“ remote”有什么区别?

GIT中的Branch和Remote有什么区别?

“ git subtree pull”和“ git pull -s subtree”有什么区别

'git pull'和'git pull origin master'有什么区别?

“ git fetch && git checkout”和“ git checkout”之间有什么区别?

“ git submodule foreach git pull origin master”和“ git pull origin master --recurse-submodules”之间有什么区别?

git pull和git reset --hard origin / <branch>有什么区别?

git svn init + fetch和git svn clone有什么区别?

Mercurial和Git有什么区别?

“ git commit”和“ git push”之间有什么区别?

git diff和git diff HEAD有什么区别?

“ git push”和“ git exile push”有什么区别?

git am和git apply有什么区别?

“ git reset”和“ git checkout”有什么区别?