'How to remove a tag from a commit in Visual Studio 2019?
Looks like there's no way to checkout a previous commit in Visual Studio 2019 except by adding tags and then checking out the commit with the tag. It works (sometimes), but it's clunky.
Is there a way to remove a tag from a commit after adding it? Using Windows and the built-in Git functionality in Visual Studio 2019. I don't have any other Git utilities installed in Windows.
Solution 1:[1]
Is there a way to remove a tag from a commit after adding it? (...) Visual Studio (...).
In Visual Studio 2022
's search textbox, type in "terminal" and hit enter:
"Developer Powershell" opens, in which you can use git tag -d v2.0.1
for example and hit enter again:
Open or refresh the git history tab to see that the tag has been deleted.
Solution 2:[2]
You can checkout a previous commit by doing a hard or soft reset on your local branch with VS2019. That will reset your local branch back to a specific commit and (locally) drop or keep, respectively, the changes made since that commit.
I think MS purposefully made it hard to remove a commit tag. If you're using Azure Dev-ops, you can try the Tags area in their portal .
Otherwise, I'm seeing nothing allowing you to manage this in VS2019. You can install Git and use a command like git tag -d <tag_name> for a local tag.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | SymboLinker |
Solution 2 | colbybhearn |