Git - One Line Log Messages
03 Mar 2014A lot of the time when viewing the log in your Git repository you aren’t that interested in the author and date/time of each commit - the message and the hash are the most important parts. It would therefore be helpful to cut out everything from the log apart from the main details of each commit. Luckily, just like most things in Git, this is pretty straightforward to do:
git log --pretty=oneline
Which will output something like:
This is all well and good, yet the hash is pretty long and distracted. Again however there is a way around that as well:
git log --pretty=oneline --abbrev-commit
Which outputs:
This time we only get a fraction of the hash for each commit (which is all we really need) and the message - much better!