tags:

views:

30

answers:

1

In Windows, in Git Bash, if I do a git diff I get all the differences flushed to the console with some sort of prompt to control the output buffer. What are the commands I can use in this mode of Git Bash? I don't know where to look for a quick reference.

I've worked out that <Enter> will scroll one line, and <Space> will scroll all lines, but not much more than that. To quit I do a Ctrl-C, which seems to go back to a command prompt, but then sometimes when I start typing a new command it seems to go back to the unfinished diff output and I'm confused as to why.

Really dumb question, I know.

+2  A: 

git diff pipes the diff file into the Unix less pager. Press h when the diff view is open to see a bunch of commands. The particularly important ones to know:

  • h - Display help/commands
  • q - Quit/close
  • [Space] scroll 'k' lines ahead, where k should default to your terminal's line display height.
  • [Enter] scroll 'k' lines ahead, where k defaults to 1
eldarerathis
Exactly what I needed to know, thanks!
Gavin Schultz-Ohkubo