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
This worked for me:
$ git push --delete origin refs/heads/0.2
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With