Git Tags and Releases

Mark release points with lightweight and annotated tags.

  • git tag
  • annotated tag
  • git describe
  • release tag
  • push tags

Git Tags and Releases

Mark release points with lightweight and annotated tags.

Commands

CommandWhat it does
git tagList tags
git tag -a v1.3.0 -m "release"Create an annotated release tag
git tag v1.3.0-betaLightweight tag (pointer only)
git push origin v1.3.0Publish one tag
git push origin --tagsPublish all local tags
git describe --tagsNearest tag + distance, e.g. v1.3.0-4-gabc123

Example

git tag -a v1.3.0 -m "Search GA"
git push origin v1.3.0
git describe --tags

FAQ

Annotated vs lightweight tags?

Annotated tags store message, date, and tagger — always use them for releases; lightweight tags are throwaway pointers.

How do I delete a published tag?

Delete locally (git tag -d) and remotely (git push origin :refs/tags/<tag>), then tell the team to prune.

Preguntas frecuentes

Annotated vs lightweight tags?
Annotated tags store message, date, and tagger — always use them for releases; lightweight tags are throwaway pointers.
How do I delete a published tag?
Delete locally (git tag -d) and remotely (git push origin :refs/tags/<tag>), then tell the team to prune.

Git