To get tag name in a git repository, we can use git describe command.
git describe
git describe --tag v0.5
git tag --sort=committerdate v0.1 v0.2 v0.3 v0.4 v0.5
Source(s):
StackOverFlow
GitHub Gist
Last updated 2 years ago