Is there a way to wrap git commit comments (when viewed via git log
), so they are not cut off at the end of the line? It seems like there should be a pretty simple solution, but I haven't been able to find one.
Thanks.
The ideal size of a git commit summary is around 50 characters in length. Analyzing the average length of commit messages in the Linux kernel suggests this number.
Or you can change your pager to use less -R
$ git config --global core.pager 'less -R'
This will tell less to stop trying to control how the screen is formatted (you can normally scroll right and left during a git log
using arrow keys). And as the less manual says "Thus, various display problems may result, such as long lines being split in the wrong place." Which is what you want, you want the line ending to appear at the right of your screen (the wrong place) instead of where the comment author put it.
Also to note, pressing the right arrow key without modifying your pager, will let you see more of the code. Which is my preferred method.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With