When I run git branch
(from bash or csh), it automagically pipes the output through less
. However, with only a few branches in the repository this is beyond unnecessary, it is annoying, as the branch listing disappears once I quit less.
Checking ~/.gitconfig
file and the local .git/config
files finds nothing about a pager or any thing else that would cause this. Otherwise, nothing I've found in web searches has been helpful or promising.
Why is this happening, and what (if anything) can I do to make less
run when needed (e.g. when doing a git log
when there's a lot of history) but not otherwise (like a git branch
with only 2 or 3 branches)?
export LESS=-X
in the.profile
. This keeps less from "cleaning up" the screen. I hate it that the standard setting clears the screen because I often need to cut and paste stuff or use it as a reference. – Peter - Reinstate Monica Aug 22 '19 at 09:25