开发者

What's the difference "origin master" vs "origin/master"

开发者 https://www.devze.com 2023-04-11 01:23 出处:网络
What is the difference between a space and a slash when running git commands? I sometimes see git push origin master (which is a space)

What is the difference between a space and a slash when running git commands?

I sometimes see

git push origin master (which is a space)

and other times I see

git rebase origin/master (which uses a slash)

What is the difference in this convention? Is it that the slash nota开发者_JAVA技巧tion accesses a local cached copy whereas the space version actually reaches out to the remote repo (github) ?


This is not a "convention". The former is two separate arguments in different positions with different meanings to git push, and the latter is a single argument which identifies the remote-tracking branch origin/master.

0

精彩评论

暂无评论...
验证码 换一张
取 消