A tag was created that contains "Ã" in the name, I am unable to delete the tag tried the following:
git tag -d -- xxÃxx
git push origin :refs/tags/xxÃxx
git config --global core.precomposeunicode true
git tag -d -- xxÃxx
git push origin :refs/tags/xxÃxx
Tried also with double quote for the name.
When executing the commands git says that the tag was deleted: Local delete:
Deleted tag 'xxÃxx' (was 434eae7)
After push:
remote: warning: Allowing deletion of corrupt ref.
- [deleted] xxÃxx
Tag "xxÃxx" comes as new at every git fetch -p or git pull(event after two consecutive pulls).
Also tried to delete the tag from source tree but the tag appears again.
In a similar case I used combination of echo
and xargs
as follows to delete bad tag containing wrong unicode character \u0083
:
echo -e '\u0083release-1.7.5-hotfix1' |xargs git tag -d
echo -e '\u0083release-1.7.5-hotfix1' |xargs git push --delete origin
In order to stop receiving tag 'xxÃxx'
as a new tag at every pull/fetch. I've made a clone of the repository.
I did not find a solution on how to actually delete the tag, but this is acceptable for me.
Special thanks to @VonC.
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