git tag
Mark specific commits as named releases
Practical example
git tag -a v1.0.0 -m "Initial public release" git push origin v1.0.0 git tag -n # list tags with annotations
Command overview & how it works
Tags are named references to specific commits, typically used to mark release versions (v1.0.0, v2.3.1-beta). There are two types: lightweight tags (just a name pointing to a commit) and annotated tags (stored as full objects with a message, author, and date). Use git tag -a v1.0.0 -m "Release 1.0.0" to create an annotated tag — recommended for releases because they include metadata. List tags with git tag (all), git tag -l "v1.*" (by pattern), or git tag -n (with annotation messages). Push tags to a remote with git push origin v1.0.0 or git push origin --tags (all tags). Delete a local tag with git tag -d v1.0.0 and a remote tag with git push origin :refs/tags/v1.0.0. Tags are not automatically included in git push — you must push them explicitly.
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.
Practical tips
- Use annotated tags (git tag -a v1.0.0 -m '...') for releases — they store the tagger, date, and a message.
- Tags are not pushed automatically: push them explicitly with git push origin v1.0.0 or git push origin --tags.
- Tag a past commit by including its hash: git tag -a v1.0.0 <hash>.
Deep-dive guides & tutorials
In-depth walkthroughs and practical scenarios related to git tag
- 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.
5 min readRead guide - 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.
7 min readRead guide - Tutorial
Git Tagging: Versioning Your Project Milestones
Mark important commits with tags for releases, versions, and milestones. Learn lightweight vs annotated tags and how to share them.
4 min readRead guide
Related commands
More from Tagging & Releases