How should I use git diff for long lines?

后端 未结 15 2498
庸人自扰
庸人自扰 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:06

    Mac OSX: None of the other answers except someone45's '-S' while less is running worked for me. It took the following to make word-wrap persistent:

    git config --global core.pager 'less -+$LESS -FRX'
    

提交回复
热议问题