Git Tagging: Versioning Your Project Milestones
What Are Tags?
A tag is a named reference to a specific commit. Unlike branches, tags do not move — they permanently mark a point in history. Tags are ideal for releases, version bumps, and important milestones.
git tag v1.0.0
Lightweight vs Annotated Tags
Lightweight tags are just a name pointing to a commit — like a branch that never moves.
git tag v1.0.0
Annotated tags store metadata: the tagger's name, email, date, and a message. Use these for public releases:
git tag -a v1.0.0 -m "Initial production release"
Viewing Tags
# List all tags git tag # Filter by pattern git tag -l "v2.*" # Show tag details git show v1.0.0
Pushing Tags
Tags are not pushed by default with git push. You must push them explicitly:
# Push a specific tag git push origin v1.0.0 # Push all tags git push origin --tags
Checkout a Tag
To inspect code at a specific version:
git checkout v1.0.0 # You are now in detached HEAD state
Semantic Versioning
Most projects follow semver: MAJOR.MINOR.PATCH:
- MAJOR — breaking changes (v2.0.0)
- MINOR — new features, backward compatible (v1.1.0)
- PATCH — bug fixes, backward compatible (v1.0.1)
git tag -a v2.0.0 -m "Breaking: redesign API endpoints" git tag -a v1.1.0 -m "Feat: add user search endpoint" git tag -a v1.0.1 -m "Fix: handle null response in auth"
Tags make your release history navigable and integrate with CI/CD pipelines for automated deployments.
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.
Related Git Command References
All 28 commands →Syntax breakdowns and practical terminal examples for commands used in this topic
More on Remotes & Team Collaboration
All articles →- Guide
Git Submodules: Managing Dependencies Across Repositories
Include one repository inside another with git submodules. A practical guide to adding, updating, and working with nested repos.
Read guide - Guide
Git SSH Setup: Secure Authentication for Remote Repositories
Set up SSH keys for password-less, secure Git operations. Connect to GitHub, GitLab, and any Git server without typing credentials.
Read guide