更新时间:2023-02-14 21:54:31
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).