Skip to main content

Create, list, delete or verify tags. Tag is reference to specific commit.

# To list all tags:
git tag

# To create a tag with the given name pointing to the current commit:
git tag <tag_name>

# To create a tag with the given name pointing to a given commit:
git tag <tag_name> <commit>

# To create an annotated tag with the given message:
git tag <tag_name> -m <tag_message>

# To delete the tag with the given name:
git tag -d <tag_name>

# To get updated tags from remote:
git fetch --tags

# To push a tag to remote:
git push origin tag <tag_name>

# To list all tags whose ancestors include a given commit:
git tag --contains <commit>