Show full Git commit message in console

alexdmejias picture alexdmejias · Jan 11, 2012 · Viewed 34.3k times · Source

I'm trying to output the full commit message in the console and I am able get the message, however in order to see the full message I have to keep resizing the console window in order to reveal more. I am on Windows using Cygwin.

The command I'm using is git log --pretty=full.

Answer

sehe picture sehe · Jan 11, 2012

pagers to the rescue

git log | less

Make sure you don't have -S on an alias for less

Also, it is generally considered good practice to limit the width for commit messages. I believe a common standard is 78 chars (IIRC), and most texteditors do a good job of ensuring such style rules (auto formatting your message).

Update: As a reference data point, git-config lists:

gui.commitmsgwidth

   Defines how wide the commit message window is in the git-gui(1). "75" 
   is the default.