git ls-tree -r --name-only <commit>(where instead of<commit>there can be<branch>).
You might want to use also-toption which lists subdirectories before descending into themgit diff <branchA>:<fileA> <branchB>:<fileB>,
or if you want to compare the same filegit diff <branchA> <branchB> -- <file>