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

后端 未结 14 1468
轮回少年
轮回少年 2020-11-28 00:52

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

相关标签:
14条回答
  • 2020-11-28 01:29

    first of all you need to setup line ending preferences in termnial

    git config --global core.autocrlf input
    git config --global core.safecrlf true
    

    Then you can use :q

    0 讨论(0)
  • 2020-11-28 01:29

    Before pressing exit commands(q, etc..) check current input language: if it isn't English commands may not work.

    0 讨论(0)
  • 2020-11-28 01:29

    If you are facing this?

    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.

    0 讨论(0)
  • 2020-11-28 01:32

    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]
    
    0 讨论(0)
  • 2020-11-28 01:35

    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.

    0 讨论(0)
  • 2020-11-28 01:35

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

    1. CTRL + C
    2. :qa!
    0 讨论(0)
提交回复
热议问题