Last Updated: February 25, 2016
·
5.914K
· jmarizgit

Git - pretty one line log

A regular log on git looks like the following:

commit 5555663340c8007cf73f34ccb2593a301fcc8
Author: Mariz Melo <mm AT emoriz.com>
Date:   Sat Oct 13 22:17:43 2012 -0700
first commit

But sometimes you only want to see your log messages, in this case you can use the following command:

$ git log --pretty=oneline

The result will be something like this:

$ 5555663340c8007cf73f34ccb2593a301fcc8   first commit

or as @koraktor pointed out:

$ git log --oneline

will show:

$ 55556633 first commit

Happy hacking!

3 Responses
Add your response

I like git log --oneline even more, because it's only showing the shortened commit IDs thus saving some terminal space.

over 1 year ago ·

Thanks @koraktor

over 1 year ago ·

You can also customize is the way you like it, and add it as an alias in ~/.gitconfig:

[alias]
    log --pretty=\"format:%ad %h (%an): %s\" --date=short

which gives
2014-12-25 e1a590d (Walid): adds troubleshooting for charges

over 1 year ago ·