How do I prevent git diff from using a pager ?
–no-pager to git, Passing the option -F have no output page file in the screen .
git --no-pager diff
# set an evaporating environment variable to use cat for your pager GIT_PAGER=cat git diff # tell less not to paginate if less than a page export LESS="-F -X $LESS" # ...then git as usual git diff
As a previous answer mentioned, passing the –F option to quit all the content in one screen, and then screen is reset the seeing content, the –X option use the following to enable conditional paging based on the amount of content:
git config --global --replace-all core.pager "less -F -X"
Try this below code:
git config --global core.pager cat
Pager for all commands for all repositories:
Git subcommands by using pager.<cmd> setting alternative for core.pager and they change your settings for omit –global.
Git-config and search for pager.<cmd> for details.