Skip to main content
Back to blog
Git Tagging: Versioning Your Project Milestones — Tutorial
Tutorial4 min read

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.

bash
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.

bash
git tag v1.0.0

Annotated tags store metadata: the tagger's name, email, date, and a message. Use these for public releases:

bash
git tag -a v1.0.0 -m "Initial production release"

Viewing Tags

bash
# 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:

bash
# 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:

bash
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)

bash
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.

Chapter 05 · Remotes & Collaboration

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.

Learn more

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 →