Skip to next modified file in git diff?

I made the mistake of upgrading a Visual Studio project from 2008 to 2010 without checking in my previous changes first. Because of this I have a huge system generated file (10k+ lines) that had every 4th line changed.

I'm usually pretty good about checking in stuff often, so I will typically just use the down key to scroll through my changes. In this case it will take several lifetimes to scroll through the changes to the system generated file.

Is there a way to skip to the next modified file after you have done a git diff so that you don't have to scroll through every change on every file?


By default, git diff pipes its output through less. So you can use the less commands to search for the next header. Type /^diff and press Enter to skip to the next file.


While in git diff, simply hit n to go straight to the next file, and again to the one afterwards, and so on.

You can also use N to go back a file.

(For these commands to work, you'll need to first type /^diff and press Enter, as explained in this answer.)