5

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?

dey.shin
  • 990
  • 10
  • 21

2 Answers2

5

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

enter image description here

Community
  • 1
  • 1
Andy Li-MSFT
  • 28,712
  • 2
  • 33
  • 55
  • it seems like there hasn't been much of traction with the _User Voices_ post. I assume we can't really expect to get this implemented without the votes? – dey.shin Oct 12 '17 at 20:09
2

We have the Onsite TFS (Version 16.122.26918.3), and if you go to the Tags tab of TFS and you can Delete the tag, Highlight the Tag you want to remove, then choose Delete from the ... elipsis on the listed Tag line.

Paul Farry
  • 4,730
  • 2
  • 35
  • 61