How To Completely Delete Git Tag

How To Completely Delete Git Tag

Explains the commands and steps required to completely delete a git tag both locally and the remote server.

February 27, 2019

This post list the commands required to delete a git tag both locally and on the remote server.

Delete Tag Locally

The git command tag -d can be used to delete a tag locally.

# Delete local tag
git tag -d <tag name>

# Example - Delete the local tag alpha1
git tag -d alpha1

Delete Tag on Remote Server

The git command push can be used to delete a tag on the remote server as shown below for remote server named origin.

# Delete remote tag

git push origin :refs/tags/<tag name>
# OR
git push --delete origin <tag name>


# Example - Delete the remote tag alpha1

git push origin :refs/tags/alpha1
# OR
git push --delete origin alpha1

Write a Comment
Click the captcha image to get new code.
Discussion Forum by DISQUS