Had a quick look at the sourcecode and what you desire is not possible. You only get that one format if you want timezone-adjusted times. If it’s important to you, you could pass the output through sed
:
git log --pretty='format:%ad %Cgreen%h%Cred%d %Creset%s' --date=local | sed 's/^\(.\{7\}\) \([0-9]\) /\1 0\2 /'
If you want to set this up as an alias mylog
, run this command:
git config --global alias.mylog '!'"git log --pretty='format:%ad %Cgreen%h%Cred%d %Creset%s' --date=local | sed 's/^\(.\{7\}\) \([0-9]\) /\1 0\2 /'"
Or add this to your ~/.gitconfig
[alias]
mylog = !git log --pretty='format:%ad %Cgreen%h%Cred%d %Creset%s' --date=local | sed 's/^\\(.\\{7\\}\\) \\([0-9]\\) /\\1 0\\2 /'