Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I like having the pager enabled for git log for example, but not git diff because I have my own visual diff tool that comes up, and I hate having to hit 'q' at the command line after the diff is done with. Is there a way to do this?

share|improve this question
up vote 6 down vote accepted

You can set the pager.diff configuration variable to disable the pager for specific subcommands. See pager.<cmd> in git-config(1).

git config --global pager.diff false

Leave out --global if you only want to make this configuration change for the current repository.

share|improve this answer

Not a great solution, but you could have a git wrapper which determines what command you are running and pipes the output through cat to eliminate the terminal detection.

case "$1" in)
  diff) git "$@" | cat;;
  *) exec git "$@";;

Of course my example program is entirely braindead. You would need to skip over options instead of hard-coding "$1" in the program.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.