Cheat Sheets · Git Cheat Sheet · Git Tag a Release — Lightweight & Annotated Tags

Git Tag a Release — Lightweight & Annotated Tags

git tag -a v1.0.0 -m "Release v1.0.0"

Annotated (Recommended)

git tag v1.0.0

Lightweight

git push origin v1.0.0

Push Single Tag

git push origin --tags

Push All Tags

Tag creation and push commands

CommandTypeDescription
git tag -a v1.0.0 -m "Release v1.0.0"Annotated (Recommended)Includes tagger name, email, date, and message
git tag v1.0.0LightweightSimple bookmark pointer to current commit (no metadata)
git push origin v1.0.0Push Single TagPush specific tag to remote repository
git push origin --tagsPush All TagsPush all local tags to remote at once

Tags point to specific points in Git history, typically marking release versions (e.g. v1.0.0, v2.1.3) in semantic versioning.

Related Git recipes

FAQ

Why prefer annotated tags over lightweight tags?
Annotated tags are full Git objects with cryptographic verification, author name, timestamp, and release notes. They are standard for releases.

Can I tag an older historical commit?
Yes: append the commit SHA: git tag -a v1.0.0 -m "Release v1.0.0".

How to check out a tag?
Run git checkout v1.0.0 (puts you in detached HEAD) or git switch -c release-1.0 v1.0.0 to start a branch from the tag.

Stop memorizing — build it interactively

Build tag workflows in the Git Builder

Full reference: Git Cheat Sheet