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 form | What it does |
|---|---|
-a NAME -m MSG | Make an annotated tag with a message, author and date |
-l PATTERN | List tags, for example -l "v1.*" |
-d NAME | Delete a local tag |
-f | Move an existing tag |
-s | Sign the tag with your GPG key |
Examples
git tag -a v1.2.0 -m "Release 1.2.0"
git tag -l "v1.*"
v1.0.0
v1.1.0
v1.2.0
git tag v1.1.1 8b1d7e4
git push origin v1.2.0
git tag -d v1.2.0
git push origin --delete v1.2.0
Notes
- git push does not send tags by default. Push one by name, or all with git push --tags.
- Use annotated tags (-a) for releases. They store who made them and when.
- On GitHub, gh release create TAG can also create the tag for you.
See also
Last reviewed 2026-10-09.