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)?
Best Answer
You can set the following:
This will ensure that
less
willF
)R
)Chop long lines (S
)X
)Edit: Removed the
S
option based on Peter A. Scheider's comment