我正在运行gitimmersion.com实验室,每次我运行:git hist --all命令它似乎打破终端并抛出这个:
〜
〜
〜
〜
(END)
而且我无法再输入任何命令.所以我最终关闭了终端窗口并重新开始.
任何人都知道为什么会这样,以及如何解决它?
谢谢!
ver*_*nzt 12
默认情况下,Git将长输出管道传输到所谓的寻呼机,如果输出不适合屏幕,则可以更容易地查看输出.该~字符表示,这些线路都不在原来的输出,但它显示他们,这样就可以过去的底部向下滚动(即输出的最后一行可以去到屏幕的顶部).
您通常可以使用箭头键向上或向下滚动,然后按下即可退出q.
或者,如果您不想在寻呼机中输出,请尝试以下方法:
$ git --no-pager hist --all
Run Code Online (Sandbox Code Playgroud)
取自git help config
\n\n\nRun Code Online (Sandbox Code Playgroud)\ncore.pager\n The command that git will use to paginate output. Can be overridden with the GIT_PAGER environment variable.\n Note that git sets the LESS environment variable to FRSX if it is unset when it runs the pager. One can\n change these settings by setting the LESS variable to some other value. Alternately, these settings can be\n overridden on a project or global basis by setting the core.pager option. Setting core.pager has no affect\n on the LESS environment variable behaviour above, so if you want to override git\xe2\x80\x99s default settings this\n way, you need to be explicit. For example, to disable the S option in a backward compatible manner, set\n core.pager to less -+$LESS -FRX. This will be passed to the shell by git, which will translate the final\n command to LESS=FRSX less -+FRSX -FRX.\n
要完全跳过寻呼机:
\n\ngit config --global core.pager cat\nRun Code Online (Sandbox Code Playgroud)\n\n-Fto 标志很好less,因为它告诉我们less,如果输出适合一页,则不要对输出进行分页。