Add this to your user's ~/.gitconfig under [alias] to make it globally available:
lsch = "!f() { git diff --name-status -r "HEAD~$1"; }; f"
You can invoke this to retrieve all affected files in the last 7 commits like so:
$ git lsch 7
-
https://coderwall.com/p/8rtfgg/git-alias-to-show-affected-files-in-last-n-commits