I have a strange git scenario: I've been developing on master, and ive noticed that when my CI clones down and attempts to modify a git repository, it doesn't see "master" in the refspec. Thus, the command
git checkout master
Fails. To fix this (as i need my CI to commit some minor updates to master), I tried to do:
git checkout remotes/origin/master
However, that command results in a DETACHED head. The final fix was that, rather than doing a checkout, I do checkout -b
like so:
git checkout -b master
Which magically seems to "create" the master branch which (I thought already exists), and then all is right in the world.
My question is, thus: What is the difference between remotes/origin/master and the master created via git checkout -b
? Since I only have one remote, I would think they would be synonymous.