I’m using less as my Git pager.
If the git diff output is readable on one page, my Git prints the output to the screen.
Sometimes I’m too fast with typing Ctrl + D (half page down), which kills my terminal. Is there an option to enable the pager for git diff, even if the output is very small?
This doesn’t work:
git -p diffgit --paginate diffgitsettings:pager.diff = true
This is controlled by the
-F(--quit-if-one-screen) option to less.Git uses the options
FRSXfor/of less by default, if none are specified by the$LESSor$GIT_PAGERenvironment variables. To change it, specify thecore.pageroption and set it toRSX:Older versions of Git used to recommend the following in their documentation: