Git diff skip to next file?

in Development


If you need to do a git diff, but the first file it shows is a huge file, e.g. a Javascript library that got replaced, you can skip it in two steps:

  • Type /^diff - to enter search mode with a slash and then search for diff - at the beginning of a line - which signifies the listing of a new file in diff's output
  • Hit n as much as you need to skip to the next file. Optionally, hit N to go back to the previous file
#git