git lg

A better way to display your git logs in your console.

Copy and paste this command into any project you're using Git with and you'll see a much nicer commit tree than the standard git reflog or git log.

git log --topo-order --all --graph --date=local --pretty=format:'%C(green)%h%C(reset) %><(55,trunc)%s%C(red)%d%C(reset) %C(blue)[%an]%C(reset) %C(yellow)%ad%C(reset)%n'

Or you can add this to your .gitconfig on your computer. This file is usually found at ~/.gitconfig.

        name = Your Name
        email =
    lg = log --topo-order --all --graph --date=local --pretty=format:'%C(green)%h%C(reset) %><(55,trunc)%s%C(red)%d%C(reset) %C(blue)[%an]%C(reset) %C(yellow)%ad%C(reset)%n'

Now you can run git lg and see a much nicer tree. Here's what it looks like when you use the custom git lg command instead of git log.

And here's what the old and ugly git log command looks like: