Don't ask me how but I managed to get accidentally the following remote branches in a git repository:
$ git branch -r
origin/HEAD -> origin/master
origin/master
origin/refs/heads/master
All are pointing to the same commit. How can I remove the unnecessary listing for origin/refs/heads/master
?
I tried to do the following
$ git push origin :refs/heads/master
error: dst refspec refs/heads/master matches more than one.
But as shown, this gives an error.
git push origin :refs/heads/refs/heads/master
– Cardon