Pretty Git log

Are you tired of boring log showed by git log command like below?

git-log-screenshot

Yeah, me too! Lets make a better git log right now which actually makes sense. To get a sneak peak about what we’ll achieve, run this command on your terminal:

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

You’ll get something like this:

pretty-git-log-screenshot

I know its too big! Lets make an alias then. Just run this on your terminal:

git config --global alias.lg "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit"

From now on, you can simply write git lg to get this pretty log every time. You can even see the lines that changed. Just type in git lg -p and you’ll get something like this:

git-pretty-log-with-change

Hope you’ll ❤ this!

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.