How should I use git diff for long lines?

Peter Boughton picture Peter Boughton · Sep 25, 2008 · Viewed 45.7k times · Source

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 don't line up—making it harder to track the change.

Is there a way to prevent that problem or to simply make the lines wrap instead?

I'm running Git 1.5.5 via mingw32.

Answer

someone45 picture someone45 · Jun 24, 2010

Or if you use less as default pager just type -S while viewing the diff to reenable wrapping in less.