Search code examples
gitterminalgit-log

Show full Git commit message in console without having to resize the window


I'm trying to output the full commit message in the console and I am able to 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.


Solution

  • 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.