How to delete a (remote) tag from a repository in git

git

I once had created a tag and pushed it to a remote repository, but my tag was bad. Luckily you can delete a (remote) tag from a repository in git.

My bad tag is called ‘1.0.1’ in the example below:

git tag -d 1.0.1

This deletes the tag from your local branch.

git push origin :refs/tags/1.0.1

This deletes the tag from the remote repository.

Comments

comments powered by Disqus