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.
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/commandsq
- 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
精彩评论