The command that you can use to see the file names that changed between two commits according to the question is
git diff --name-only SHA1 SHA2
Also, you can use to see the difference between any latest commands using
git diff --name-only HEAD~10 HEAD~5
Here this command will help you to see the file names between tenth latest commit and fifth latest commit.
And also you can use git show command for having the file name of SHA1 and SHA2 separately using
git show --name-only SHA1
git show --name-only SHA2