Home Explore Blog CI



git

2nd chunk of `Documentation/git-tag.adoc`
082a2dab34c7b915196f02e9cf3145c8efcfc786c31f60e90000000100000fa2
 the commit message is displayed instead.

-l::
--list::
	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 each of those
options for details.

--sort=<key>::
	Sort based on the key given.  Prefix `-` to sort in
	descending order of the value. You may use the --sort=<key> option
	multiple times, in which case the last key becomes the primary
	key. Also supports "version:refname" or "v:refname" (tag
	names are treated as versions). The "version:refname" sort
	order can also be affected by the "versionsort.suffix"
	configuration variable.
	The keys supported are the same as those in `git for-each-ref`.
	Sort order defaults to the value configured for the `tag.sort`
	variable if it exists, or lexicographic order otherwise. See
	linkgit:git-config[1].

--color[=<when>]::
	Respect any colors specified in the `--format` option. The
	`<when>` field must be one of `always`, `never`, or `auto` (if
	`<when>` is absent, behave as if `always` was given).

-i::
--ignore-case::
	Sorting and filtering tags are case insensitive.

--omit-empty::
	Do not print a newline after formatted refs where the format expands
	to the empty string.

--column[=<options>]::
--no-column::
	Display tag listing in columns. See configuration variable
	`column.tag` for option syntax. `--column` and `--no-column`
	without options are equivalent to 'always' and 'never' respectively.
+
This option is only applicable when listing tags without annotation lines.

--contains [<commit>]::
	Only list tags which contain the specified commit (HEAD if not
	specified). Implies `--list`.

--no-contains [<commit>]::
	Only list tags which don't contain the specified commit (HEAD if
	not specified). Implies `--list`.

--merged [<commit>]::
	Only list tags whose commits are reachable from the specified
	commit (`HEAD` if not specified).

--no-merged [<commit>]::
	Only list tags whose commits are not reachable from the specified
	commit (`HEAD` if not specified).

--points-at <object>::
	Only list tags of the given object (HEAD if not
	specified). Implies `--list`.

-m <msg>::
--message=<msg>::
	Use the given tag message (instead of prompting).
	If multiple `-m` options are given, their values are
	concatenated as separate paragraphs.
	Implies `-a` if none of `-a`, `-s`, or `-u <key-id>`
	is given.

-F <file>::
--file=<file>::
	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 <key-id>`
	is given.

--trailer <token>[(=|:)<value>]::
	Specify a (<token>, <value>) pair that should be applied as a
	trailer. (e.g. `git tag --trailer "Custom-Key: value"`
	will add a "Custom-Key" trailer to the tag message.)
	The `trailer.*` configuration variables
	(linkgit:git-interpret-trailers[1]) can be used to define if
	a duplicated trailer is omitted, where in the run of trailers
	each trailer would appear, and other details.
	The trailers can be extracted in `git tag --list`, using
	`--format="%(trailers)"` placeholder.

-e::
--edit::
	The message taken from file with `-F` and command line with
	`-m` are usually used as the tag message unmodified.
	This option lets you further edit the message taken from these sources.

--cleanup=<mode>::
	This option sets how the tag message is cleaned up.
	The  '<mode>' can be one of 'verbatim', 'whitespace' and 'strip'.  The
	'strip' mode is default. The 'verbatim' mode does not change message at
	all, 'whitespace' removes just leading/trailing whitespace lines and
	'strip' removes both whitespace and commentary.

--create-reflog::
	Create a reflog for the tag. To globally enable reflogs

Title: Git Tag Options
Summary
The git-tag command offers various options to list, sort, and filter tags, including options to specify patterns, sort orders, and formatting, as well as options to control the display of tag messages and reflogs.