Two tag flavors:
Lightweight — just a pointer to a commit. Created by git tag v1.0.0. No metadata.
Annotated — a full object in the database with its own message, author, timestamp, and (optionally) GPG signature.
git tag -a v1.0.0 -m "stable release"
Why annotated almost always wins:
- They carry release notes inside the tag itself (
git show v1.0.0).
- They can be signed.
- They're what
git describe uses by default.
- Most release tooling (npm publish, GoReleaser, GitHub Releases) expects annotated.
Use lightweight tags only for short-term private bookmarks.