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 was getting this error when I tried to checkout new branch:
error: pathspec 'BRANCH-NAME' did not match any file(s) known to git.
When I tried git checkout origin/
, I got the detached HEAD:
(detached from origin/)
Finally, I did the following to resolve the issue:
git remote update
git fetch
git checkout --track origin/