0

I need to include only specific files (either by the list or by regex/wildcard pattern) in

git diff -R origin/master

Use case: I've ported an app to a different programming language, the original repository has changed since and I need to see changes only for the *.cc and *.h files, excluding the rest (which are plenty)

Denis Yarkovoy
  • 1,277
  • 8
  • 16

1 Answers1

1

You can use patterns without problems. Example: git diff -- '*.c' That goes through subdirectories.

eftshift0
  • 26,375
  • 3
  • 36
  • 60
  • Thank you, I figured it out. For some reason, enclosing pattern in single quotes didn't work for me on Windows, but it did work without quotes, like this: git diff -R origin/master *.cc *.h I realize that my question is a duplicate, but still leaving it here because the accepted answer in the original question didn't work for me – Denis Yarkovoy Sep 22 '18 at 14:23