Disable all paging in git

I do all of my terminal work in emacs and would prefer to use the much richer tools for moving around the output than "less". Worse, any time an applications pages inside of emacs, it is horribly annoying because it is a dumb terminal.

While I can swap things like "git help rm" for "M-x man git-rm", I would prefer to just disable all paging of everything in git. Then I don't have to hunt for the right incantations.

  git config --global core.pager cat

Doesn't seem to do the trick.

  git config --global man.viewer "man -P cat"

causes problems because "man -P cat" isn't a valid executable.

How can I get git to just dump its output?


From reading the git help manpage it looks like you should be able to

git config --global man.viewer catman
git config --global man.catman.cmd "man -P cat"

The man.viewer config value is a tool name, not a (partial) command line. Then man.catman.cmd gives the command to use for the catman tool.

It seems like setting core.pager to cat should take care of everything else.

To disable pagination for all commands, set core.pager or GIT_PAGER to cat.

(c) http://www.kernel.org/pub/software/scm/git/docs/git-config.html

Addition. You also asked about git help. It actually not a git's pager, it is $MANPAGER. So maybe for you it will be enough just make PAGER=cat.

PAGER=cat git help log works with no pagers.

You could try alias git='git --no-pager'. Or if that doesn't work for some reason inside of emacs, you could create a git shell script somewhere earlier in your PATH that calls the real git --no-pager.

Adding to Geoff Reedy's answer above. This also gets rid of the _ and ^H in the man pages:

git config --global core.pager cat
git config --global man.viewer catman
git config --global man.catman.cmd 'man -P "col -b"'

Need Your Help

Android widget not updating - has incorrect widget ID

android widget android-appwidget appwidgetprovider

I've been working on a widget and making some advances (I hope) but still can't get it to do what I want.