How to remove a Git tag (locally and remotely)

This is a reminder to myself, for future reference.

Removing a Git tag from a local repository

To delete a tag from your local repo, use the tag command followed by the -d (or –delete) option and the tag version/number:

git tag -d your-tag-version-number-goes-here

Say for example that I wanted to delete a Git tag named 3.3.1 from my local repo:

git tag -d 3.3.1

Removing a Git tag from a remote repository

If you have already pushed the tag to a remote repository -such as GitHub– then you also need to do this right after deleting the tag from your local repo:

git push origin :refs/tags/your-tag-version-number-goes-here

0 responses on “How to remove a Git tag (locally and remotely)”

Leave a Reply

Your email address will not be published. Required fields are marked *