How can I quickly scroll down the output of git commands?

大城市里の小女人 提交于 2019-12-21 03:35:19

问题


I have to show my commits using git show c36432. The files are very big and it sometimes takes a long time to go line by line.

What can I do to move fast, like page by page? I am using iterm as terminal on Mac OS X.


回答1:


Press the space bar. By default, git uses the less pager to display long output, and the space bar moves down a page at a time in less.

Other less keyboard shortcuts also work, such as typing / followed by a word you want to search for, which can be handy when searching a Git diff or log.



来源:https://stackoverflow.com/questions/32365970/how-can-i-quickly-scroll-down-the-output-of-git-commands

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!