Reputation: 5998
Before, I could just type
git log
Now, I have to type:
git log | less
to get the same effect. I haven't (intentionally) changed any parameters. I've checked my global config: "~/.gitconfig" and my project Git config ".git/config" but I can't see anything that would cause this. All of the command parameters seem to be for opting out of this.
Furthermore, none of these work either:
git config --add --global core.pager less
git log
or
GIT_PAGER=less git log
or
PAGER=less git log
Upvotes: 21
Views: 14031
Reputation: 1833
setting git core.pager will ensure log outputs directed to pager:
git config --global core.pager less
Upvotes: 1
Reputation: 3699
I figured out the real reason when I had the issue on MSYS. It just needed the full path. e.g.
git config --add --global core.pager /usr/bin/less
(I suppose on Linux it would be similar.)
It's pretty obvious the underlying issue is that a quirk caused git to not be aware of the PATH.
Upvotes: 4
Reputation: 5998
"did you try unplugging it and plugging it back in" I opened a new terminal and it stopped happening. I am still super curious though what in that other window's environment could be causing this, so I'll leave it open for awhile and if anyone has any ideas please let me know :)
Upvotes: 8
Reputation: 90396
There are two parameters that might affect this: the core.pager
Git variable, and the $PAGER
environment variable. Check what you have with
git config core.pager
echo $PAGER
One of them should be set to less
Upvotes: 6
Reputation: 21003
See the config variable core.pager: "The command that git will use to paginate output. Can be overridden with the GIT_PAGER environment variable."
Upvotes: 3