为什么我必须在"git log"末尾打"Q"? [英] Why do I have to hit 'Q' at the end of 'git log'?

查看:75
本文介绍了为什么我必须在"git log"末尾打"Q"?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

考虑:

git log -n 20 --pretty=oneline

我告诉Git,我只需要查看最近的20次提交.我讨厌打 Q 摆脱END.有没有办法让我不必打 Q ?

I am telling Git that I need to see only the last 20 commits. I hate to hit Q to get rid of END. Is there a way out so that I don't have to hit Q?

推荐答案

Git会自动为您分页输出,因为日志倾向于轻易地溢出单个终端窗口大小(您是一种罕见的例外-单行)格式和较小的提交限制).如果您不想这样做,请使用:

Git is automatically paging the output for you, since logs tend to easily overflow a single terminal window size (you're in one of the rare exceptions - a oneline format and a small commit limit). If you don't want this, use:

git --no-pager log -n 20 --pretty=oneline

请注意,这确实意味着您将得到一些丑陋的包装,因为寻呼机以前为您关闭了包装(因为您可以使用光标键左右滚动).

Note that this does mean you'll get some ugly wrapping, because the pager was previously turning off wrapping for you (since you could use the cursor keys to scroll left-right).

这篇关于为什么我必须在"git log"末尾打"Q"?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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