I've made a commit and a tag (using git tag -a -m ). I found out before I pushed that I needed to revert the commit so I used git revert --soft HEAD~
. How do I also remove the tag? I've checked with git push --tags --dry-run
that it hasn't been pushed yet, so I hope it's possible to remove.
To delete the Git tag from the local repo, run the git tag -d tag-name command where tag-name is the name of the Git tag you want to delete. To get a list of Git tag names, run git tag.
Select and expand the "Tags" tab on the left. Right-Click on the tag you want deleted. Select "Delete YOUR_TAG_NAME" In the verification window, select "Remove Tag From Remotes"
Just run the following command from the branch where you created the tag:
git tag -d <tag name>
Even if you pushed the tag already it is still possible to remove it. Check out this useful blog post.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With