Vasu Patel logoVasu Patel
← Git Mastery
All chapters in this track
  1. 011. The Mental Model
  2. 022. Essential Setup
  3. 033. Core Daily Workflow
  4. 044. Branching
  5. 055. Merging & Conflict Resolution
  6. 066. Rebasing
  7. 077. Remote Repositories
  8. 088. Stashing
  9. 099. Undoing Things
  10. 1010. Tagging & Versioning
  11. 1111. Cherry-Pick
  12. 1212. Git Bisect & Blame
  13. 1313. Git Hooks
  14. 1414. Submodules
  15. 1515. Team Workflows
  16. 1616. Power Commands & Aliases
  17. 1717. Reflog: The Safety Net
  18. 1818. Practice Tasks
  19. 19Quick Reference Cheatsheet

Chapter 10 of 19

10. Tagging & Versioning

Tags mark specific commits as release points.

# Lightweight tag (just a pointer)
git tag v1.0.0

# Annotated tag (recommended — includes message, author, date)
git tag -a v1.0.0 -m "Initial stable release"
git tag -a v1.2.0 a3b2c1 -m "Tag on specific commit"

# List tags
git tag
git tag -l "v1.*"           # filter

# Show tag details
git show v1.0.0

# Push tags (tags are NOT pushed with git push by default)
git push origin v1.0.0          # push one tag
git push origin --tags          # push all tags

# Delete tag
git tag -d v1.0.0               # local
git push origin --delete v1.0.0 # remote

Semantic versioning

MAJOR.MINOR.PATCH
  2  .  1  .  3

MAJOR — breaking changes
MINOR — new backwards-compatible features
PATCH — bug fixes