Git Tag

Version Controlbeginneraka Tagaka Release Tag

// Definition

A named, fixed pointer to a specific commit — used to mark release points like `v2.4.0`. Unlike a branch, a tag doesn't move; it permanently marks "this exact commit is release 2.4.0". Annotated tags also carry a message and author, which is what release tooling reads.

// Why it matters

Tags are how QA pins exactly which commit a release (and its test run) corresponds to — "the bug is in v2.4.0" maps to one immovable commit. They're also what CI/CD pipelines trigger on for release builds, so understanding tags is part of understanding what got tested and shipped.

// How to test

git tag -a v2.4.0 -m "Release 2.4.0"   # annotated tag on the current commit
git push origin v2.4.0                  # often triggers a release pipeline
git checkout v2.4.0                     # check out the exact shipped code to test it

// Common mistakes

  • Confusing a tag (fixed pointer) with a branch (moving pointer)
  • Lightweight tags where annotated were needed (release tooling wants the metadata)
  • Re-tagging/moving a tag others have pulled (breaks their reference to the release)

// Related terms