★ git ll
• 191 words • 1 min • updated
In my ~/.gitconfig there’s an alias for git log, inspired by Thorsten
Ball1:
ini
[alias]
ll = "!f() { git log --graph --pretty='tformat:%C(always,yellow)%h%C(always,reset) %C(always,green)%ar%C(always,reset){%C(always,bold blue)%an%C(always,reset){%C(always,red)%d%C(always,reset) %s' \"$@\" | column -t -s '{' | less -XS; }; f"I wish I could get rid of the shell utilities (column and less), but they’re
necessary to properly align the columns.
I also tried to get rid of the function wrapper (f()): it works when you run
git ll. However when you run git ll . (=display the commit history from
files underneath the current directory only) it fails:
% git ll .
. is a directoryTherefore it’s better to keep it around. I am satisfied with the current form.
The output looks like this (image from upstream):
Update(2025-08-21): The following modification is better2 and has no external dependencies:
ini
[alias]
ll = log --graph --pretty=tformat:'%C(always,yellow)%h%C(always,reset) %C(always,green)%<(25,trunc)%ar%C(always,reset) %C(always,bold blue)%<(20,trunc)%an%C(always,reset) %C(always,red)%d%C(always,reset) %s'