I made a git branch unintentionally named "0.2" which is also a tag.
So I tried to remove it from origin:
$ git branch -rD origin/0.2
Deleted remote branch origin/0.2
But then:
$ git fetch origin
* [new branch] 0.2 -> origin/0.2
Here is the error I got wwhen pushing:
$ git push --force origin :0.2
error: dst refspec 0.2 matches more than one.
So I removed the remote tag:
$ git tag -d 0.2
$ git push origin :refs/tags/0.2
Still no go:
$ git branch -rD origin/0.2
* [new branch] 0.2 -> origin/0.2
- Is it a git bug?
- Did I do something wrong apart from having a tag and branch name equals?
- How to remove this remote branch?
git push origin :0.2?git remote prune origingit branch -rD origin/0.2is the same asgit push origin :0.2for newest git version. And yes the remote tag was still there. I also tried theprune.