两者有什么区别git pull https://git-scm.com/docs/git-pull and git fetch https://git-scm.com/docs/git-fetch?
用最简单的话来说,git pull http://git-scm.com/docs/git-pull does a git fetch http://git-scm.com/docs/git-fetch随后是一个git merge http://git-scm.com/docs/git-merge.
git fetch
更新您的远程跟踪分支refs/remotes/<remote>/
。此操作可以随时安全运行,因为它永远不会更改您的任何本地分支refs/heads
.
git pull
使本地分支的远程版本保持最新,同时还更新其他远程跟踪分支。
来自 Git 文档git pull http://git-scm.com/docs/git-pull:
git pull
runs git fetch
使用给定的参数,然后根据配置选项或命令行标志,将调用git rebase
or git merge
协调不同的分支。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)