git tag Label a commit, such as a release

Creates a fixed name for a point in history, typically a version number like v1.2.0. Unlike a branch, a tag does not move.

Synopsis

git tag [OPTION]... [NAME [COMMIT]]

Common options

Option or formWhat it does
-a NAME -m MSGMake an annotated tag with a message, author and date
-l PATTERNList tags, for example -l "v1.*"
-d NAMEDelete a local tag
-fMove an existing tag
-sSign the tag with your GPG key

Examples

Tag the current commit as a release
git tag -a v1.2.0 -m "Release 1.2.0"
List tags
git tag -l "v1.*"
v1.0.0
v1.1.0
v1.2.0
Tag an older commit
git tag v1.1.1 8b1d7e4
Publish a tag
git push origin v1.2.0
Delete a tag locally and on the remote
git tag -d v1.2.0
git push origin --delete v1.2.0

Notes

See also

Last reviewed 2026-10-09.