`git tag` sorted in chronological order of the date of the commit pointed to
In git 2.3.3 I can just do this to get them sorted by date:
git tag --sort version:refname
PS: For the record, I also answered the same thing on a duplicate question
git tag | xargs -I@ git log --format=format:"%ai @%n" -1 @ | sort | awk '{print $4}'
Just tested with git 2.8.0:
git tag --sort=committerdate
For a full list of field names you can use, see https://git-scm.com/docs/git-for-each-ref#_field_names
For commit and tag objects, the special
creatordate
andcreator
fields will correspond to the appropriate date or name-email-date tuple from the committer or tagger fields depending on the object type. These are intended for working on a mix of annotated and lightweight tags.Fields that have name-email-date tuple as its value (
author
,committer
, andtagger
) can be suffixed withname
,date
to extract the named component.
For information, to get it in reverse order, prefix it with "-"
git tag --sort=-taggerdate