Show git tags from most recent created and filter by tag name 🎏

Photo by Ben White on Unsplash

Show git tags from most recent created and filter by tag name 🎏

Β·

1 min read

Why we need this?

  • In case we want to know which tag is newest.
  • We want to know tag description by commit message.

Git command options

git log --no-walk --tags --pretty="%h %d %s" --decorate=full | grep "tag-name"

Output's template:

<shortened version of commit hash>  (tag: <tag name>, tag: <another tag>, ...) <commit message>
# for example
# abc123456  (tag: refs/tags/xxx.v1) fix: bug when something has changed

References