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
Written by Kristian Lewis Jones
Related protips
2 Responses
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
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Git
Authors
khasinski
591.1K
dmichaelavila
500.4K
Related Tags
#git
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#