Tag (Git)

A Git tag is a label that marks a specific commit, most often used to mark release versions like v1.0.0. Unlike a branch, a tag is fixed and doesn't move as new commits are added.

Git & DevOps

Tags give a memorable name to important points in history, such as released versions. Annotated tags (created with -a) also store a message, author, and date.

Tags aren't pushed automatically — you share them with git push origin <tag> or git push --tags.

Syntax

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

Examples

Bash

git tag -a v1.0.0 -m "First release"
git tag

Output:

v1.0.0

Learn it in a lesson

See also

Back to the Dictionary