Commit Details

I noticed that in git log I’m always interested in commit date, not author date. The difference is that author date shows when author finished their work and commit date shows when it actually landed (was merged by someone else, like CI bot). Commit dates are arguably more useful because they preserve the chronology of git log. As there’s no built-in log formatting which would give me a combination of author (not committer) + commit date, I had to become a little bit creative:

# This goes e.g. to ~/.gitconfig

[pretty]
    # format:/tformat: controls spaces between commits
    commitdetails = "format:\
%C(yellow)commit %H%C(auto)%d%Creset%n\
Author:     %an <%ae>%n\
CommitDate: %cd%n%n\
%w(0,4,4)%B"

[format]
    pretty = commitdetails