如何退出git log或git diff [英] How to exit git log or git diff

查看:326
本文介绍了如何退出git log或git diff的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正试图在 Git沉浸式的帮助下学习Git.
每当我使用git loggit diff时,都有一件让我感到沮丧的事情:

I'm trying to learn Git with the help of Git Immersion.
There's one thing that frustrates me whenever I use git log or git diff:

遇到这个(END)字时,我不知道下一步该怎么做.

I can't figure out what to do next when I encounter this (END) word.

我无法键入任何命令,最终我关闭了当前的Bash窗口,然后打开了另一个窗口.如何键入要使用的下一个命令?

I can't type any commands, and I end up closing the current Bash window and open another. How do I type in the next command that I want to use?

推荐答案

您正在使用less程序,该程序使git log的输出可滚动.

You're in the less program, which makes the output of git log scrollable.

键入 q 退出此屏幕.键入 h 以获得帮助.

Type q to exit this screen. Type h to get help.

如果您不想在寻呼机中读取输出并希望将其仅打印到终端,请将环境变量GIT_PAGER设置为cat或将core.pager设置为cat(执行).

If you don't want to read the output in a pager and want it to be just printed to the terminal define the environment variable GIT_PAGER to cat or set core.pager to cat (execute git config --global core.pager cat).

这篇关于如何退出git log或git diff的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆