In my project I've deleted all old branches that was hanging in git, but some branches I was not be able to remove:
$ git push origin :0.2.0.0
error: dst refspec 0.2.0.0 matches more than one.
error: failed to push some refs to 'ssh://git@<repo>.git'
I have few git repos and I have some old branches that was probably created by mistake. Those branches have the same name as a tag that was created and I'm not able to delete those branches.
Is there a way to delete those branches? It seems that the only command that you can find anywhere is git push origin :<branch>
or git push -d origin <branch>
and there are not distinction between branch and tag in those commands.
I have no idea how those branches were created, but I would like to get rid of them.