Skip to main content
Back to command reference
Tagging & Releases

git tag

Mark specific commits as named releases

Practical example

bash
git tag -a v1.0.0 -m "Initial public release"
git push origin v1.0.0
git tag -n                     # list tags with annotations

Command overview & how it works

Tags are named references to specific commits, typically used to mark release versions (v1.0.0, v2.3.1-beta). There are two types: lightweight tags (just a name pointing to a commit) and annotated tags (stored as full objects with a message, author, and date). Use git tag -a v1.0.0 -m "Release 1.0.0" to create an annotated tag — recommended for releases because they include metadata. List tags with git tag (all), git tag -l "v1.*" (by pattern), or git tag -n (with annotation messages). Push tags to a remote with git push origin v1.0.0 or git push origin --tags (all tags). Delete a local tag with git tag -d v1.0.0 and a remote tag with git push origin :refs/tags/v1.0.0. Tags are not automatically included in git push — you must push them explicitly.

Chapter 05 · Remotes & Collaboration

Master upstream tracking, SSH auth, and team workflows

Upstream sync strategies, merge vs rebase on pull, and semantic release tagging in the 97-page course — ₹499.

Learn more

Practical tips

  • Use annotated tags (git tag -a v1.0.0 -m '...') for releases — they store the tagger, date, and a message.
  • Tags are not pushed automatically: push them explicitly with git push origin v1.0.0 or git push origin --tags.
  • Tag a past commit by including its hash: git tag -a v1.0.0 <hash>.

Deep-dive guides & tutorials

In-depth walkthroughs and practical scenarios related to git tag

All guides →

Related commands

More from Tagging & Releases