How should I use git diff for long lines?

后端 未结 15 2513
庸人自扰
庸人自扰 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 05:48

    To use less as the pager and make line wrapping permanent you can simply enable the fold-long-lines option:

    git config --global core.pager 'less -+S'
    

    This way you do not have to type it while using less.

    Cheers

提交回复
热议问题