Git cannot checkout branch - error pathspec did not match any file s known to git
I'm unable to check out a branch in Git that I had worked on earlier. It is showing me the below message.
Git: cannot checkout branch - error: pathspec '…' did not match any file(s) known to git.
While getting error “did not match any file s known to git”, You can try git fetch so that your local repository gets all the new info from github. It just takes the information about new branches and no actual code. After that, the git checkout should work fine.