Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to stop/cancel 'git log' command in terminal? [duplicate]

In terminal, I ran this command git log . It displayed a list of log but it seems that because it is long, the terminal is not displaying everything. Below logs there is : that I can see more logs when I hit enter key.

How do I terminate a command, and show the prompt for running another one.

Based on my search, I realized that ctrl+c should be used, but it doesn't work for me. I tried to enter ! and it stopped that task and I returned to $. But I'm not sure this is correct way because when hit !, from ./a/b/c moved me to ./a/b/

like image 708
Hesam Avatar asked Feb 12 '13 06:02

Hesam


People also ask

How do I stop git log in terminal?

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 cancel a git command?

You can hit the key q (for quit) and it should take you to the prompt.

How do I revert from git diff?

Using WIN + Q worked for me. Just q alone gave me "command not found" and eventually it jumped back into the git diff insanity.

How do I press Return in git bash?

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


1 Answers

You can hit the key q (for quit) and it should take you to the prompt.

Please see this link.

like image 163
thtsigma Avatar answered Oct 21 '22 00:10

thtsigma