Skip to the content.

Get Tag Names in Git

To get tag name in a git repository, we can use git describe command.

Example: Get Latest Tag Name

git describe --tag
v0.5

Example: Get All Tags Sorted by Commit Date

git tag --sort=committerdate
v0.1
v0.2
v0.3
v0.4
v0.5

Source(s):