Differences between git pull origin master & git pull origin/master

git pull origin mastergit pull origin/master什么区别?


git pull origin master will pull changes from the origin remote, master branch and merge them to the local checked-out branch.

git pull origin/master will pull changes from the locally stored branch origin/master and merge that to the local checked-out branch. The origin/master branch is essentially a "cached copy" of what was last pulled from origin , which is why it's called a remote branch in git parlance. This might be somewhat confusing.

You can see what branches are available with git branch and git branch -r to see the "remote branches".

链接地址: http://www.djcxy.com/p/3954.html

上一篇: 这些`git fetch`语法有什么区别?

下一篇: git pull origin master和git pull origin / master之间的区别