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)

0

1 Answer 1

1

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

Sign up to request clarification or add additional context in comments.

1 Comment

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.