Tags & Releases
Tags mark specific commits as named milestones — almost always used for release versions. Unlike branches, tags never move when new commits are added. They are permanent, immutable markers in your project history.
01.Lightweight vs Annotated Tags
Lightweight tags are just a named pointer to a commit — like a branch that never moves. Annotated tags are stored as full Git objects and contain: the tagger's name and email, the date tagged, a tagging message, and optionally a GPG cryptographic signature. Always use annotated tags for releases — they carry rich metadata and can be signed for authenticity.
02.Semantic Versioning (SemVer)
The standard convention for release tags: v{major}.{minor}.{patch}. Major: breaking API changes that require callers to update (v2.0.0). Minor: new features that are backward compatible (v1.3.0). Patch: bug fixes only (v1.3.1). Pre-releases: v2.0.0-beta.1, v2.0.0-rc.2. Following SemVer tells users instantly whether they can safely upgrade.
Commands
How is a tag different from a branch?