When I type git log
in PowerShell it prints what looks like a normal response.
But at the bottom it doesn't show the normal working directory that prompts me for a new command, it just shows :
(a colon) and no command works; not quit, not ctrl z, not ctrl c, it just prints another colon.
You just need type q to exit the screen!
You can press q to exit. git hist is using a pager tool so you can scroll up and down the results before returning to the console.
To exit this you can use: :q for exit; :h for help; Note: if you don't want to read the output in pager you can use an ENV variable GIT_PAGER to cat or you need to set core.
Mac: Type ls and hit Return. Windows using Git Bash: Type ls and hit Enter. Windows using Command Prompt: Type dir and hit Enter.
It puts you in a pager (most probably less
if you installed MSysGit or Github for Windows), because the output you requested is longer than one screen page.
You can scroll up/down/left/right with your arrow keys, the Page Up/Page Down keys and the J/K/H/L keys.
To show inline help, press ? and to quit, press Q.
You can use a different pager or turn it off if you want to. As man git config
points out, you can use the core.pager
setting to set it to a different pager, or set its value to cat
to disable pagination for all Git commands.
If the pager is killed using Ctrl-C then the pager keeps running in the background and on each newline in terminal it will print a line and (END)
. So far I have not found a way of saving such a terminal. When I exit
the terminal, the pager still keeps it alive until I kill the window.
q works to exit the pager / less
-command if Ctrl-C has not been used.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With