Linux "git-tag" Command Line Options and Examples
Create, list, delete or verify a tag object signed with GPG

Add a tag reference in refs/tags/, unless -d/-l/-v is given to delete, list or verify tags. Unless -f is given, the named tag must not yet exist. If one of -a, -s, or -u <keyid> is passed, the command creates a tag object, and requires a tag message.


Usage:

git tag [-a | -s | -u ] [-f] [-m | -F ] [-e]
[ | ]
git tag -d ...
git tag [-n[]] -l [--contains ] [--no-contains ]
[--points-at ] [--column[=] | --no-column]
[--create-reflog] [--sort=] [--format=]
[--[no-]merged []] [...]
git tag -v [--format=] ...






Command Line Options:

-a
Make an unsigned, annotated tag object
git-tag -a ...
-s
Make a GPG-signed tag, using the default e-mail address’s key.
git-tag -s ...
-u
Make a GPG-signed tag, using the given key.
git-tag -u ...
-f
Replace an existing tag with the given name (instead of failing)
git-tag -f ...
-d
Delete existing tags with the given names.
git-tag -d ...
-v
Verify the GPG signature of the given tag names.
git-tag -v ...
-n<num>
<num> specifies how many lines from the annotation, if any, are printed when using -l. Implies --list.The default is not to print any annotation lines. If no number is given to -n, only the first line is printed. If the tag is notannotated, the commit message is displayed instead.
git-tag -n<num> ...
-l
List tags. With optional <pattern>..., e.g. git tag --list 'v-*', list only the tags that match the pattern(s).Running "git tag" without arguments also lists all tags. The pattern is a shell wildcard (i.e., matched using fnmatch(3)).Multiple patterns may be given; if any of them matches, the tag is shown.This option is implicitly supplied if any other list-like option such as --contains is provided. See the documentation for eachof those options for details.
git-tag -l ...
--sort
Sort based on the key given. Prefix - to sort in descending order of the value. You may use the --sort=<key> option multipletimes, in which case the last key becomes the primary key. Also supports "version:refname" or "v:refname" (tag names are treatedas versions). The "version:refname" sort order can also be affected by the "versionsort.suffix" configuration variable. The keyssupported are the same as those in git for-each-ref. Sort order defaults to the value configured for the tag.sort variable if itexists, or lexicographic order otherwise. See git-config(1).
git-tag --sort ...
-i
Sorting and filtering tags are case insensitive.
git-tag -i ...
--column[
Display tag listing in columns. See configuration variable column.tag for option syntax.--column and --no-column without optionsare equivalent to always and never respectively.This option is only applicable when listing tags without annotation lines.
git-tag --column[ ...
--contains
Only list tags which contain the specified commit (HEAD if not specified). Implies --list.
git-tag --contains ...
--no-contains
Only list tags which don’t contain the specified commit (HEAD if not specified). Implies --list.
git-tag --no-contains ...
--merged
Only list tags whose commits are reachable from the specified commit (HEAD if not specified), incompatible with --no-merged.
git-tag --merged ...
--no-merged
Only list tags whose commits are not reachable from the specified commit (HEAD if not specified), incompatible with --merged.
git-tag --no-merged ...
--points-at
Only list tags of the given object (HEAD if not specified). Implies --list.
git-tag --points-at ...
-m
Use the given tag message (instead of prompting). If multiple -m options are given, their values are concatenated as separateparagraphs. Implies -a if none of -a, -s, or -u <keyid> is given.
git-tag -m ...
-F
Take the tag message from the given file. Use - to read the message from the standard input. Implies -a if none of -a, -s, or -u<keyid> is given.
git-tag -F ...
-e
The message taken from file with -F and command line with -m are usually used as the tag message unmodified. This option lets youfurther edit the message taken from these sources.
git-tag -e ...
--cleanup
This option sets how the tag message is cleaned up. The <mode> can be one of verbatim, whitespace and strip. The strip mode isdefault. The verbatim mode does not change message at all, whitespace removes just leading/trailing whitespace lines and stripremoves both whitespace and commentary.
git-tag --cleanup ...
--create-reflog
Create a reflog for the tag. To globally enable reflogs for tags, see core.logAllRefUpdates in git-config(1). The negated form
git-tag --create-reflog ...