9

I have many new files as well as some modified files that I added to my branch, and when I do git difftool master it diffs all modified files as well as opening up for all new files. I see things like

Launching WinMergeU.exe: /dev/null src/example1.cpp

It is rather annoying since it is somewhat pointless to looking at a diff of new files.

Is there a way to only have Git diff the modified files and ignore new files?

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Michael
  • 3,604
  • 3
  • 19
  • 12

1 Answers1

21

I just tested this answer, and it appears to work equally well with difftool.

git difftool --diff-filter=M
Community
  • 1
  • 1
merlin2011
  • 71,677
  • 44
  • 195
  • 329