Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"Git Log" command in Powershell - unable to terminate process

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.

like image 270
natecraft1 Avatar asked Jun 16 '13 22:06

natecraft1


People also ask

How do I exit git log Powershell?

You just need type q to exit the screen!

How do I exit git log command?

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.

How do I exit git after diff?

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.

How do I press a return in git?

Mac: Type ls and hit Return. Windows using Git Bash: Type ls and hit Enter. Windows using Command Prompt: Type dir and hit Enter.


2 Answers

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.

like image 99
Nevik Rehnel Avatar answered Oct 04 '22 22:10

Nevik Rehnel


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.

like image 23
arberg Avatar answered Oct 04 '22 23:10

arberg