How do I remove or delete a tag from a Git repo?

You can use the git tag command to put a permanent marker on a specific commit. Later, you can use the tag to compare the tagged commit to other, future commits in the future.  When you push to your Bitbucket remote repository, the tag goes along.

Removing a Tag

For example, if you have created a tag called release01 in a Git repository you would remove it from your repository by doing the following:

git tag -d release01 
git push origin :refs/tags/release01

To remove one from a Mercurial repository:

hg tag --remove featurefoo

Was this helpful?

Thanks for your feedback!

2 Archived comments

  1. User avatar


    git push :refs/tags/release01

    ssh: Could not resolve hostname : Name or service not known


    I believe it should be

    git push origin :refs/tags/release01

    tested in git version

    17 Feb 2013
  2. User avatar


    It works


    17 Jan 2014
Powered by Confluence and Scroll Viewport