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中使用git pull origin master与git pull origin/master的区别。前者从远程origin仓库的master分支拉取更改并合并到当前检出的本地分支;后者则是从本地存储的origin/master分支拉取更改并合并到当前检出的本地分支。origin/master本质上是上次从origin拉取的内容缓存副本。

被折叠的 条评论
为什么被折叠?



