I\'m not sure why I\'m unable to checkout a branch that I had worked on earlier. See the commands below (note: co
is an alias for checkou
I got this error when trying to checkout a branch via:
git checkout branchX
which I had not checked out before. It only worked when explicitly stating the remote:
git checkout --track origin/branchX
The reason for this was, that I had 2 different remotes (origin + sth. else) configured in git config. As I didn't need the second remote, I removed it and voilá, it worked. The alternative to set the default remote via:
checkout.defaultRemote=origin
did not work for me