When there's a new file, git diff
shows a diff between /dev/null
and the new file, thus showing the whole file as added lines. Similarly, when a file is deleted, git diff
diffs it against /dev/null
, showing every line being deleted.
The -D
option suppresses that diff for deleted files.
Is there an option to suppress the diff for created files?
(A reasonably careful reading of git help diff
suggests that the answer is "no", but I'd really like a way, so I'm hoping there's something I missed.)
[Footnote: Yes, I do know how to type /^diff/
in the pager, to skip to the next diff, but I'd rather not have to.]