Tags and Versioning

Tags are references used to mark important points in history, commonly releases such as v1.0.0. Lightweight tags point directly to an object, while annotated tags store additional metadata such as tagger information, message, and date.

Create a Release Tag
git tag -a v1.0.0 -m "Release 1.0.0"
git tag
git show v1.0.0
git push origin v1.0.0
💡 The annotated tag marks the current commit with release metadata. Tags must be explicitly pushed unless using an appropriate tag push command.
Key Takeaways
  • Tags are useful for marking releases.
  • Annotated tags contain metadata and are generally preferred for releases.
  • Tags are not automatically pushed with ordinary branch pushes.
Knowledge Check

Which command creates an annotated tag?