如何退出git status命令生成的终端列表模式?
当前回答
我必须在这里进行猜测,但是git可能会将其输出运行到您的$PAGER程序中,可能更少,也可能更多。在任何一种情况下,输入q都可以让您退出。
其他回答
[试试这个,也看看图片]
我试过其他方法,但都没用。我输入'cd ../' 这个方法奏效了
代码:
zsh: command not found: Q
$(虚拟)➜ML git:(master)退出
Zsh:命令未发现:退出
$(虚拟)➜ML git:(master) quit()
功能>
$(虚拟)➜ML git:(master) cd ../
(虚拟)➜最终
首先,您需要在终端中设置行结束首选项
git config --global core.autocrlf input
git config --global core.safecrlf true
然后你可以用q
我更喜欢的组合是Gq,它打印所有差异,然后退出。
你可以输入h来显示与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>
---------------------------------------------------
请在git bash中尝试以下步骤,它可能对您有帮助。
CTRL + c :质量保证!
:q
实际上,这是一个更少的命令。它使用与vi相同的命令。
推荐文章
- 我应该在.gitignore文件中添加Django迁移文件吗?
- 错误:您对以下文件的本地更改将被签出覆盖
- 如何合并2 JSON对象从2个文件使用jq?
- Git rebase—即使所有合并冲突都已解决,仍然会继续报错
- 在Git中,我如何知道我的当前版本是什么?
- 跟踪所有远程git分支作为本地分支
- 自定义SSH端口上的Git
- git如何显示不存在于.gitignore中的未跟踪文件
- 如何触发命令行PHP脚本的XDebug分析器?
- Git错误:遇到7个文件应该是指针,但不是
- GitHub克隆与OAuth访问令牌
- 移动(或“撤销”)最后一个git提交到非暂存区域
- 我可以在GitHub上对要点进行拉请求吗?
- Hg:如何做一个像git的rebase
- 如何丢弃远程更改并将文件标记为“已解决”?