xraxuw
Last Updated: February 25, 2016
·
769
· klj613
598ecfd8824fb31c9a6fdaa480e811d6

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

git

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
Say Thanks
Respond

2 Responses
Add your response

4134
D42a7264714dee5006b9c99d2567a320

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 ·
16802
60ac9dedcde8f86c71a8f03df8ad91ca

I'd rather use tig when using the CLI.

over 1 year ago ·