Reputation: 913
I want to get the list of changed files in a git repo (including submodules) and I'm using this command:
git diff HEAD --name-only && git submodule foreach git diff HEAD --name-only
that displays this:
Entering 'submodule name'
<path/to/file>
I only want to get the file path, what should I do?
Upvotes: 0
Views: 459
Reputation: 30976
One workaround is to add | grep -v '^Entering'
to suppress Entering 'submodule name'
. And git submodule
has --quiet
to do the job:
git submodule --quiet foreach git diff HEAD --name-only
Upvotes: 2