Archive

Posts Tagged ‘alias’

Nice formatted git log

September 30, 2011 Leave a comment

I’m working with git in termial only. Git command line client is fast, reliable and have all the features in comparison with any gui git client.

On the other hand, it’s nice to have some colors to quick distinguish between different type of information, i.e. when looking at git log. Following git log command nicely outputs history of commits with most important informations together with branch information:

git log --pretty=format:'%C(yellow)%h%Cred%d%Creset - %C(cyan)%an %Creset: %s %Cgreen(%cr)'

Following one prints commit history as colored graph:

git log --pretty=oneline --decorate --graph

You can either alias these commands in bash or any other shell you use or alias as git commands in .gitconfig file in [alias] section.

Categories: source control Tags: , ,