git compare two revisions of a file code example
Example: 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
$ git diff HEAD^^ HEAD main.c
$ # show diff between HEAD(current commit) and HEAD^^(two commits back) for main.c