admin 管理员组

文章数量: 1086923

git pull远程master,git pull origin master和git之间的区别git pull origin / master

What is the difference between git pull origin master and git 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".

本文标签: git pull远程master git pull origin master和git之间的区别git pull originmaster