Git Cheatsheet - Quick Git Command Reference

Quick reference for common Git commands. Search, copy, and use Git commands instantly.

Share
Back to Git Cheatsheet

git tag

Manage tags (version markers)

Syntax

git tag [options] [<tagname>] [<commit>]

Common Options

OptionDescription
-a <tag>Create annotated tag
-m <msg>Add tag message
-d <tag>Delete local tag
-l, --listList all tags
-n <num>Show tag annotation (lines)
--sort=<key>Sort by key

Examples

git tag

List all tags

git tag v1.0.0

Create lightweight tag

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

Create annotated tag

git tag -d v1.0.0

Delete local tag

git push origin v1.0.0

Push single tag to remote

git push origin --tags

Push all tags to remote

git push origin --delete v1.0.0

Delete remote tag

Related Commands

Related Tools

More Code & Dev Tools