How to exit a 'git status' list in a terminal?

Viewed 256394

I'm new to Git and the terminal. How can I exit a listing mode generated by the git status command?

16 Answers

q or SHIFT+q will do the trick. This will get you out of many extensive page scrolling sessions like git status, git show HEAD, git diff etc. This will not exit your window or end your session.

You can disable pager for commands that don't recognize --no-pager flag.

git config --global pager.<command> false

I disable for log aliases and set specific quantity to return.

git config --global pager.log false

Please try this steps in git bash, It may help you.

  1. CTRL + C
  2. :qa!

If you are facing this?

enter image description here Sometimes it is possible that while writing in Gitbash you get into > and you just can not get out of that.
It happens with me quite often while I type ' by mistake in Gitbash(See in the image).

How to solve this in Mac?

control + C

I have not checked it in Windows. But if it does please edit that in my answer.

In Linux Terminal

After git diff typing

 :q 

you can exit from screen showing changes accross pages.

After you performed merge your project from remote or pull updates from remote

ctrl + x

[try this and see the image too]

I tried other methods but didnt work. I just put 'cd ../' and it worked

codes:

zsh: command not found: Q

$(virtual) ➜ ML git:(master) quit

zsh: command not found: quit

$(virtual) ➜ ML git:(master) quit()

function>

$(virtual) ➜ ML git:(master) cd ../

(virtual) ➜ final

exit did it for me. My results after pressing return;

my-mac:Car Game mymac$ exit
logout
Saving session...
...copying shared history...
...saving history...truncating history files...
    ...completed.
[Process completed]
Related