25 Apr 2017

This article will take less than 1 minute to read.
No comments

Just a short one. I want to share a simple command to display nicer git log in the terminal. git log has --pretty=format option built-in, we are just going to pass formatting to it.

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

And it looks like this:

Nicer git log

Then add it to your .bash_profile as an alias (I’m using glog) and that’s it.

alias glog="git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset'"
Category
Development

No comments, be the first to comment

Unfortunately, I have some problems with the comment system I'm using. If you can't submit a comment, please wait one minute and try again. I'm sorry for the inconvenience, I'm working on it.
Sending failed, please try again.
Thank you! Your comment is sent. Please note that all of the comments go through moderation.