创建了名称中包含“Ô的标签,我无法删除该标签,尝试了以下方法:
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
也尝试用双引号引起来。
当执行命令时,git 说标签被删除了: 本地删除:
Deleted tag 'xxÃxx' (was 434eae7)
推送后:
remote: warning: Allowing deletion of corrupt ref.
- [deleted] xxÃxx
标记“xxÃxx”在每次 git fetch -p 或 git pull 时都是新的(连续两次 pull 后的事件)。
还尝试从源代码树中删除标签,但标签再次出现。
最佳答案
在类似的情况下,我使用 echo
和 xargs
的组合来删除包含错误 unicode 字符 \u0083
的坏标签:
echo -e '\u0083release-1.7.5-hotfix1' |xargs git tag -d
echo -e '\u0083release-1.7.5-hotfix1' |xargs git push --delete origin
关于git - 由于特殊字符 "Ã",无法删除 GIT 标签,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31477450/