Prevent git from using pager for short output?

后端 未结 4 690
半阙折子戏
半阙折子戏 2021-01-03 22:11

When I was using Git Bash (Git For Windows) if a command (like git diff) had a short output (I\'m guessing smaller than the terminal\'s height) it would just pr

4条回答
  •  盖世英雄少女心
    2021-01-03 23:13

    You could configure git to use cat as the pager (instead of less).

    git config --global core.pager cat
    

    This will add the section

    [core]
        pager = cat
    

    to your ~/.gitconfig file and pipe everything through cat, i.e. just display it.

    It's discussed here How do I prevent git diff from using a pager? in more detail.

提交回复
热议问题