I have a local repo that was initially cloned from a branch (using git clone --single-branch
). That branch was merged into master and then deleted.
When I tried to switch to master in my local repo using git checkout master
, I got error: pathspec 'master' did not match any file(s) known to git.
I had to do a git checkout -b master
instead, and then git status
said I am on branch master.
But when I do a git pull
, it is still pointing to the deleted branch because it prints out fatal: Couldn't find remote ref refs/heads/deleted-branch-name
.
How do I remove any remaining references to the deleted branch, so that git pull
pulls from the master branch?