Git command for deleting local and remote tag

Git command for deleting local and remote tag

Git tags are used to store a specific version of a file and more globally tag specific commits in the history of a repository. On Github, for example, release are attached to a tag, so a point in the Git commits history.

For some reason, you may want to remove this tag from your local repository and from the remote repository.

Delete a local Git Tag

The local part is pretty simple, you just need to run the following command:

git tag -d <tag>

Delete a remote Git Tag

In order to remove a tag from the remote repository, you need to push the command to the origin. You need to run the following command:

git push --delete origin <tag>
Share this post
Follow the RSS feed

Subscribe to the newsletter

Get emails from me about web development and a lot of topics related to tech.