Is there a one liner that shows me the dates where all git lightweight tags where created ?
Something like: git show tags --format=date
?
I found in this link a solution that fits my needs:
git log --tags --simplify-by-decoration --pretty="format:%ai %d"
I've put that command in an alias in my ~/.alias
, so now everytime I run gitshowtagbydate
I get what I needed.
git log --date-order --graph --tags --simplify-by-decoration --pretty=format:'%ai %h %d'
:-)
Apr 11, 2013 at 19:23
git log --tags --simplify-by-decoration --pretty="format:%ai %d"
are the dates of the objects to which the tags point, not the dates when the tags themselves were created.
The git tag -l
shows a list of all tags. The --format
argument can be used to define a custom output. For example:
git tag -l --format='%(refname) %(taggerdate)'
Update, based on the comments below:
git tag -l --sort=-creatordate --format='%(creatordate:short): %(refname:short)'
git tag -l --format="%(taggerdate:iso8601)|%(refname:short)" | sort -r
git tag -l --sort=-creatordate --format='%(creatordate:short)|%(refname:short)'
Apr 4, 2019 at 13:24
git-for-each-ref
which is how the format
flag determines and renders the fields, you can add a *
before the fieldname so that you get at the date of the object which the tag points to. --format='%(*creatordate)'
although I didn't see any difference when I tried this.
Lightweight (non-annotated) tags do only point to another object (like a commit, which has a date). See the one of the other answers to print these (creatordate
).
Annotated tags do carry a date, an author and a message. The one of the other answers to print these (taggerdate
).
git log --tags --simplify-by-decoration --pretty="format:%ai %d"
are the dates of the objects to which the tags point, not the dates when the tags themselves were created.