From 64288aa7e626109f0832ec9566110233313e91a8 Mon Sep 17 00:00:00 2001 From: Michael Campagnaro Date: Wed, 8 Jan 2020 10:54:48 -0500 Subject: [PATCH] Display author's date in custom git log alias --- gitconfig | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gitconfig b/gitconfig index ac76690..efce50a 100644 --- a/gitconfig +++ b/gitconfig @@ -35,7 +35,11 @@ required = true process = git-lfs filter-process [alias] - lg = log --graph --pretty=format:'%Cred%h%Creset %C(yellow)%an [%cn]%d%Creset %s %Cgreen(%cr)%Creset' --date=relative + # Note: I'm using %ad in the pretty log to see the author's timestamp, as + # opposed to %cr which is the commiter's timestamp. I prefer the former + # because I sometimes edit an earlier commit message while rebasing and I + # want to continue to see the original date. + lg = log --graph --pretty=format:'%Cred%h%Creset %C(yellow)%an [%cn]%d%Creset %s %Cgreen(%ad)%Creset' --date=relative start = !git init && git commit --allow-empty -m \"Initial commit\" [rerere] enabled = true