Cannot Edit/Delete Git Tag

Finally being able to use tagging function right from the TFS Portal after the TFS 2017 Update 2, I started adding Git Tags.

Noticing that some tags are missing Description (Tagging Message in Git), I tried to edit the tags; And I can't seem to find an option to edit/delete the tags.

Taking a hint from How do I edit an existing tag message in git?, I tried to overwrite the tags by creating tags with the same name. TFS threw A Git ref with the name <tagName> already exists. error.

I may be able to follow How to delete a git remote tag? using Git Bash from my Windows machine. I'm trying to find a way to accomplish this within the TFS portal though.

How can I edit/remove a Git Tag within the TFS 2017 Update 2 Portal?


Currently, there isn't the feature to edit/remove a Git Tag via the web portal within TFS 2017 Update2. It's not supported. I have submitted a user voice here to suggest the feature, you can go and vote it up to achieve it in future.

As a workaround, just as you mentioned above, you can use Git Bash to overwrite the tags. I can reproduce the issue: "A Git ref with the name <tagName> already exists"

You have two ways to resolve that :

1. Do a force-push

eg: tag name is v1.4

git tag v1.4 v1.4 -f -m "Andy0822"
git push --force origin refs/tags/v1.4:refs/tags/v1.4

2. Delete the tag on the remote first, then push the updated tag.

git tag v1.4 v1.4 -f -m "Andy0822"

git push --delete origin v1.4

git push origin --tags

Please see this thread for more information: “tag already exists in the remote" error after recreating the git tag

在这里输入图像描述


我们有现场TFS(版本16.122.26918.3),如果您转到TFS的标签选项卡并且您可以删除标签,选中要删除的标签,然后选择列表标签中的... elipsis中的删除线。

链接地址: http://www.djcxy.com/p/49294.html

上一篇: 标签不会被删除

下一篇: 不能编辑/删除Git标签