Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot delete GIT tag because of special character "Ã"

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.

like image 968
Florian Stoica Avatar asked Jul 17 '15 13:07

Florian Stoica


2 Answers

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
like image 180
dpolivaev Avatar answered Sep 19 '22 03:09

dpolivaev


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.

like image 26
Florian Stoica Avatar answered Sep 19 '22 03:09

Florian Stoica