git show commits where file changed code example
Example 1: files changed in a commit
git diff --name-only HEAD HEAD~1
Example 2: git list all commits that changed a file
git log --follow -- filename
git diff --name-only HEAD HEAD~1
git log --follow -- filename