How to configure 'git log' to show 'commit date'

michael picture michael · Jan 9, 2013 · Viewed 68.2k times · Source

How can I configure git log to show commit date instead of author date?

Answer

twalberg picture twalberg · Jan 9, 2013

There are several options to pretty print the date. Probably the easiest is to just use one of the pre-baked --pretty formats, like git log --pretty=fuller - this will show both dates. If you want to see only one date, but make it the commit date, you can use git log --format=<some stuff>. All the allowable codes for defining the format are documented in git help log. The commit date is one of %cd, %cD, %cr, %ct or %ci, depending on what format you prefer it in.

If it's something you want to do often, put it in an alias or write an auxiliary script to save on typing.