git files changed between two commits code example
Example 1: git diff two commits one file
$ git diff HEAD^^ HEAD main.c
$ # show diff between HEAD(current commit) and HEAD^^(two commits back) for main.c
Example 2: diff specific file git different branches
git diff mybranch master -- myfile.cs
Example 3: git diff show only files
git diff --name-only SHA1 SHA2
Example 4: git files changed between two commits
git diff --name-only SHA1 SHA2