After setting up new development environment I encountered a strange git behavior that I don't recall seeing in the past.
I am used to git diff and git log
creating a new screen in the terminal and displaying their output inside (what less does by default, and I'm using it as my pager).
I can then quit and go back to my previous terminal state, with the command output gone. Now, however, output is printed right into the same screen as if it was cat (but with a pager). Any ideas how to fix this? Couldn't find any info online.
UPDATE:
Was able to fix this with @torek's help by setting core.pager
to 'less -+F -+X'
You probably have less
set to use -X
now, when you previously had less
set not to use -X
.
See my answer to How to display output of `git branch` on-screen in same CLI terminal?. Note that you can choose which pager to use, and/or whether to use a pager, too. (Well, you noted this in your question.)
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