Show tag

2 snippets in Git

Also written as show tags

GitGit

List Tags

Git · Tags
Syntax
git tag [-l "pattern"]
Example
git tag
git tag -l "v2.*"
Output
v1.0.0
v1.5.0
v2.0.0
v2.1.0

Note Use -l with a glob pattern to filter. Combine with --sort=-version:refname to sort by semantic version descending.

View Tag Details

Git · Tags
Syntax
git show <tag>
Example
git show v2.0.0
Output
tag v2.0.0
Tagger: Samira Khan <[email protected]>
Date:   Mon Mar 30 14:22:01 2026 +0000

Major release: new payment system

commit a1b2c3d...
...

Note For annotated tags, shows the tagger info and message plus the commit it points to. For lightweight tags, just shows the commit.

Frequently asked questions

How do you show tag?
Git covers this with 2 copy-ready snippets on this page. The "List Tags" snippet in Git uses `git tag [-l "pattern"]`.
Which command does the Git example use?
The "List Tags" snippet uses `git tag [-l "pattern"]`, from the Tags section of the Git cheat sheet.
What other Git snippets are shown for "show tag"?
Besides "List Tags", this page also shows "View Tag Details".
Is there anything to watch out for?
Yes. For "List Tags": Use -l with a glob pattern to filter. Combine with --sort=-version:refname to sort by semantic version descending.