0

I want to merge two branches but before, I'd like to review the changes between the two branches on all files whose filename ends with .twig.

Is it possible, or should I use some bash-magic like git diff --name-only branch1..branch2 | grep .twig ?

4

1 回答 1

1

您可以在 -- 之后将文件名传递给 git diff,因此:

git diff --name-only branch1..branch2 -- '*.twig'

应该做你想做的。我将 *.twig 放在单引号中,这样外壳就不会扩展它。

于 2013-06-20T15:37:45.277 回答