git-tag

Create, list, and manage tags

TLDR

List tags
$ git tag
Create lightweight tag
$ git tag [name]
Create annotated tag
$ git tag -a [name] -m "[message]"
Create signed tag
$ git tag -s [name] -m "[message]"
Tag specific commit
$ git tag [name] [commit]
Delete tag
$ git tag -d [name]
Push tag to remote
$ git push origin [name]
List tags matching pattern
$ git tag -l "[v1.*]"

SYNOPSIS

git tag [options] [name] [commit]

DESCRIPTION

git tag creates, lists, deletes, and verifies tag objects. Tags mark specific points in history as important, typically used for release versions.Lightweight tags are simple pointers to a commit, while annotated tags store extra metadata such as the tagger name, date, and a message. Signed tags add a GPG signature for verification.

PARAMETERS

-a, --annotate

Create annotated tag.
-m, --message msg
Tag message.
-s, --sign
Create signed tag.
-d, --delete
Delete tag.
-f, --force
Force replace tag.
-l, --list pattern
List matching tags.
-n num
Show lines of annotation.
--contains commit
Tags containing commit.
--sort key
Sort tags.
--points-at object
List tags pointing at the given object.
--format format
Format output using a `git for-each-ref`-style placeholder string.
-v, --verify
Verify the GPG signature of a signed tag.

INSTALL

sudo apt install git
sudo dnf install git
sudo pacman -S git
sudo apk add git
sudo zypper install git
brew install git
nix profile install nixpkgs#git

SEE ALSO

git-branch(1), git-commit(1)

RESOURCES

Source code · Homepage · Documentation