I want to get all files that are changed in commits that matched some conditions. So I have following: git log --grep=123
, and I need to get files that are changed in that commits as an aggregated list, e.g. if file is changed in several commits it should be included only once in the resulting list. That is like selecting several commits in tortoise svn log window, it lists all files that are changed in the selected commits
git log
shouldn't be used for scripting, but here's a quick solution:
git log --grep=pattern --name-only --pretty=format:'' | sort -u
Not exactly the answer but if your condition is position of start and end of consistent commits series git is ready to help:
git diff --name-only <SHA, tag start> <SHA, tag end>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With