开发者

Deleting/referencing a tag with an invalid character

Somehow, somebody managed to create a tag with a question-mark in its name. Now, every time I fetch, it seems to think I don't have the tag and announces it in the output:

$ git fetch origin
From github.com:myrepo
 * [new tag]         2011-01-28-rc2? -> 2011-01-28-rc2?
From github.com:myrepo
 * [new tag]         2011-01-28-rc2? -> 2011-01-28-rc2?

That's not a copy-paste error - it gets output twice.

I'm sure this is harmless, but it's driving me crazy. I've tried the obv开发者_如何学Pythonious command to delete the tag:

$ git push origin :refs/tags/2011-01-28-rc2?
fatal: remote part of refspec is not a valid name in :refs/tags/2011-01-28-rc2?

Is there some escape sequence I need to use, or am I misunderstanding what I'm seeing here?

If it's relevant, this is on github.


If you aren't already, try using a unicode-capable shell such as urxvt. Then if git fetch origin still shows a question mark, copy-paste it back into your terminal when you try to delete the tag. This way you can delete a tag with a character that you don't have a font glyph for.


I've had the same issue, although I do not know if my tag had invalid character in it. Try this:

git push origin --delete 2011-01-28-rc2?
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜