You can set the following:
git config --global core.pager 'less -FRX'
This will ensure that less
will
- Exit if the entire file can be displayed on the first screen (
F
) - Output the raw control characters for terminal formatting (
R
) Chop long lines (S
)- Don't send the init/de-init strings to the terminal - avoids clearing the screen on exit (
X
)
Edit: Removed the S
option based on Peter A. Scheider's comment