Last Updated: February 09, 2019
·
7.38K
· ranman

Save hundreds of keystrokes a day by paging more intelligently in Git

git config --global core.pager "less -F -X"

This will cause git to only open a pager if it is going to show you more than one page of information.

2 Responses
Add your response

maandree: having the text not be cleared is the desired behavior:
git grep -G somestring

lots of output that is irrelevant... then BOOM the path you want is right above your prompt when you quit less.

over 1 year ago ·

I personally prefer to use git's --no-pager option with a good ol' alias (alias gp='git --no-pager') whenever I need it.

over 1 year ago ·