Last Updated: February 25, 2016
·
890
· klj613

Stop using git[x|k|g] and start using git lg

A few months ago I was using a git gui (gitg) just to view the history tree. However I started using git lg instead (~/.gitconfig):

[alias]
    lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset %C(blue)(%an <%ae>)%Creset' --abbrev-commit --date=relative

Try it with:

git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset %C(blue)(%an <%ae>)%Creset' --abbrev-commit --date=relative

2 Responses
Add your response

To me one of the advantages of using a graphical git tool is being able to click on any sommit in the log and quickly perform operations with it (diff or view or something else...). Of course you can copy-paste the short hash in console but it's still a bit longer and less natural. Do you have a preference here?

over 1 year ago ·

I'd rather use tig when using the CLI.

over 1 year ago ·