Show git tags sorted by date

Totor picture Totor · Jan 28, 2014 · Viewed 8.2k times · Source

How to list git tags in chronological order? (recent tags first)

git tag only displays alphabetical order.

Answer

Zamicol picture Zamicol · Oct 3, 2016

The correct answer is:

git tag --sort=-taggerdate

taggerdate is the appropriate field. According to the git tag man page:

Prefix - to sort in descending order of the value.

git tag uses the same sorting keys as git-for-each-ref, which is where the sorting keys are documented.