Home > source control > Nice formatted git log

Nice formatted git log

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.

Advertisements
Categories: source control Tags: , ,
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: