How to prettify and get a more efficient output from git log
I am not satisfied with the output of git log and any of its optional arguments: too much information or too little, and hard to read. I created a simple alias that outputs one line per commit with, in order: hastag, day and time of commit, (branch, tag info), and commit message. This is all one needs 99% of the times.
173ab88 2026-06-12 17:13:14 +0200 (HEAD -> main, origin/main, origin/HEAD) sorting of roster andrea-bigair 66506ee 2026-06-12 08:03:31 -0500 corruption fix moroa ACCRE 3d1a7b2 2026-06-12 07:59:22 -0500 easier reinstall moroa ACCRE 4894226 2026-06-12 14:45:40 +0200 fixed reassignmet status andrea-bigair
The alias also colorizes the columns, outputs the last 20 commits by default but accepts an optional -xxx argument at the end to output a different number of commits (xxx is such number). The command to store it globally is the following:
git config --global alias.logs "log -20 --pretty='%C(yellow)%h%C(cyan) %ai%C(auto)%d %Creset%s %C(#88ccaa)%aN'"
Type git logs and enjoy!
[
tips
]