This is why tags are critical in production systems.
Difference Between Branches and Tags
Branch
Tag
Moves forward with commits
Fixed snapshot
Used for development
Used for releases
Mutable
Immutable (usually)
GitHub Release Tags
GitHub allows creating official releases from tags.
Example:
Release notes
binaries
changelog
downloadable artifacts
This is commonly used in:
open-source projects
enterprise deployments
CI/CD pipelines
Best Practices
Use Annotated Tags
Prefer:
git tag -a
instead of lightweight tags.
Follow Naming Standards
Good examples:
v1.0.0
release-2026-05
prod-stable
Tag Production Releases Only
Avoid excessive tagging.
Protect Release Tags
Important release tags should not be modified or deleted.
Conclusion
Git tags are essential for version control and production release management. They provide a stable reference point for important commits and make deployments, rollbacks, and release tracking significantly easier.
By tagging commits properly, teams can:
manage versions cleanly
deploy confidently
rollback safely
maintain release history efficiently
In modern DevOps and CI/CD workflows, Git tagging is a fundamental best practice.
Markdown for AI
A clean, structured version of this page for AI assistants and LLMs.
We use cookies to ensure you have the best browsing experience on our website. By using our site, you
acknowledge that you have read and understood our
Cookie Policy &
Privacy Policy.
Git tags are used to mark important points in a repository’s history, usually for:
A tag points to a specific commit and acts like a permanent bookmark.
Example:
v1.0v2.1.5production-releasestable-buildWhy Use Git Tags?
Tags are important because they help teams:
Without tags, finding a specific release commit becomes difficult.
Common Use Cases
v1.0.0v1.0.1v2.0-betaprod-apr-2026Types of Git Tags
1. Lightweight Tag
Simple pointer to a commit.
2. Annotated Tag
Stores:
Recommended for production releases.
How to Tag a Specific Commit
Step 1: View Commit History
Example:
Step 2: Tag the Specific Commit
Syntax:
Example:
This tags commit:
a3b9f77with:
v1.0Step 3: Push Tag to GitHub
By default, tags are local.
Push a single tag:
Push all tags:
Now the tag appears on:
GitHub
How to View Tags
List all tags:
Detailed tag information:
Checkout a Tagged Version
This allows you to:
Delete a Tag
Delete Local Tag
Delete Remote Tag
Semantic Versioning (Best Practice)
Most teams follow:
Example:
1.0.01.1.01.1.1Real-World Example
Imagine:
Version
v2.5deployed to productionNew deployment introduces bugs
Using tags:
Difference Between Branches and Tags
GitHub Release Tags
GitHub allows creating official releases from tags.
Example:
This is commonly used in:
Best Practices
Use Annotated Tags
Prefer:
instead of lightweight tags.
Follow Naming Standards
Good examples:
v1.0.0release-2026-05prod-stableTag Production Releases Only
Avoid excessive tagging.
Protect Release Tags
Important release tags should not be modified or deleted.
Conclusion
Git tags are essential for version control and production release management. They provide a stable reference point for important commits and make deployments, rollbacks, and release tracking significantly easier.
By tagging commits properly, teams can:
In modern DevOps and CI/CD workflows, Git tagging is a fundamental best practice.