Me and my friend has a repo which he created. He then created a branch called "lexer" for us to work on.
The problem is that while he can switch forth and back between master and lexer it does not work at all for me.
Eventually I just started over (rm -rf repo
and then cloned the repo) but it's still impossible to checkout the lexer branch?
On a freshly cloned repo:
git branch
gives:
$ git branch
* master
git checkout lexer
gives:
$ git checkout lexer
$ git status
On branch master
Your branch is up-to-date with 'origin/master'.
I CAN checkout origin/lexer but I end up in a detached HEAD state?
$ git checkout origin/lexer master
Note: checking out 'origin/lexer'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.
It is possible for me to push to the lexer branch by doing
git push origin HEAD:lexer
but well, I really would like to sort this mess out. It's so weird that it works for him but not for me? He says that he hasn't got any local changes from the git repo either...
Anyone have any clue?