如何退出terminal的git状态列表?

我是Git和Terminal的新手。 如何退出由git status命令生成的列表模式?

我不得不在这里猜测,但git可能会运行它的输出到你的$ PAGER程序,可能lessmore 。 在任何情况下,inputq应该让你出去。

 :q 

实际上这是一个较less的命令。 它使用与vi相同的命令。

键入'q',它将完成这项工作。

每当你在terminal,并有类似的困境,请记住尝试和键入“退出”,“退出”以及中止组合键“Ctrl + C”。

对于Windows:

Ctrl + q和c退出运行状态。

首先你需要设置在年度的行结束偏好

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

那么你可以使用:q

我最喜欢的组合是Gq ,它打印所有的差异,然后退出。

你可以inputh来显示帮助命令,用less打印,这会打印到控制台:

  SUMMARY OF LESS COMMANDS Commands marked with * may be preceded by a number, N. Notes in parentheses indicate the behavior if N is given. h H Display this help. q :q Q :Q ZZ Exit. --------------------------------------------------------------------------- MOVING e ^E j ^N CR * Forward one line (or N lines). y ^Y k ^K ^P * Backward one line (or N lines). f ^F ^V SPACE * Forward one window (or N lines). b ^B ESC-v * Backward one window (or N lines). z * Forward one window (and set window to N). w * Backward one window (and set window to N). ESC-SPACE * Forward one window, but don't stop at end-of-file. d ^D * Forward one half-window (and set half-window to N). u ^U * Backward one half-window (and set half-window to N). ESC-) RightArrow * Left one half screen width (or N positions). ESC-( LeftArrow * Right one half screen width (or N positions). F Forward forever; like "tail -f". r ^R ^L Repaint screen. R Repaint screen, discarding buffered input. --------------------------------------------------- Default "window" is the screen height. Default "half-window" is half of the screen height. --------------------------------------------------------------------------- SEARCHING /pattern * Search forward for (N-th) matching line. ?pattern * Search backward for (N-th) matching line. n * Repeat previous search (for N-th occurrence). N * Repeat previous search in reverse direction. ESC-n * Repeat previous search, spanning files. ESC-N * Repeat previous search, reverse dir. & spanning files. ESC-u Undo (toggle) search highlighting. --------------------------------------------------- Search patterns may be modified by one or more of: ^N or ! Search for NON-matching lines. ^E or * Search multiple files (pass thru END OF FILE). ^F or @ Start search at FIRST file (for /) or last file (for ?). ^K Highlight matches, but don't move (KEEP position). ^R Don't use REGULAR EXPRESSIONS. --------------------------------------------------------------------------- JUMPING g < ESC-< * Go to first line in file (or line N). G > ESC-> * Go to last line in file (or line N). p % * Go to beginning of file (or N percent into file). t * Go to the (N-th) next tag. T * Go to the (N-th) previous tag. { ( [ * Find close bracket } ) ]. } ) ] * Find open bracket { ( [. ESC-^F <c1> <c2> * Find close bracket <c2>. ESC-^B <c1> <c2> * Find open bracket <c1> --------------------------------------------------- 

在按退出命令之前(q等)检查当前input语言:如果不是英文命令可能不起作用。

如果你在混帐bash尝试使用退出;

我尝试使用q或ctrl + q,但他们没有在bash上工作。

Crt + c适用于Windows! user1852392

exit为我做了。 按回车后我的结果;

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