Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
530 views
in Technique[技术] by (71.8m points)

git - 如何退出git log或git diff [复制](How to exit git log or git diff [duplicate])

This question already has an answer here:

(这个问题在这里已有答案:)

I'm trying to learn Git with the help of Git Immersion .

(我正试着在Git Immersion的帮助下学习Git。)

There's one thing that frustrates me whenever I use git log or git diff :

(每当我使用git loggit diff时,有一件事让我感到沮丧:)

Git日志显示(END)标记

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

(当我遇到这个(END)单词时,我无法弄清楚下一步该做什么。)

I can't type any commands, and I end up closing the current Bash window and open another.

(我无法输入任何命令,我最终关闭当前的Bash窗口并打开另一个。)

How do I type in the next command that I want to use?

(如何输入我想要使用的下一个命令?)

  ask by Wern Ancheta translate from so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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

(你在less程序中,这使得git log的输出可以滚动。)

Type q to exit this screen.

(输入q退出此屏幕。)

Type h to get help.

(输入h获取帮助。)

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_PAGER定义为cat或将core.pager设置为cat (执行git config --global core.pager cat )。)


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...