How should I use git diff for long lines?

后端 未结 15 2519
庸人自扰
庸人自扰 2020-12-04 05:37

I\'m running git-diff on a file, but the change is at the end of a long line.

If I use cursor keys to move right, it loses colour-coding—and worse the lines do

15条回答
  •  孤街浪徒
    2020-12-04 06:08

    You can also use git config to setup pager to wrap.

    $ git config core.pager 'less -r' 
    

    Sets the pager setting for the current project.

    $ git config --global core.pager 'less -r' 
    

    Sets the pager globally for all projects

提交回复
热议问题