git check diff of last commit code example
Example: diff from last commit
#For instance, to see the difference for a file "main.c" between now
#and two commits back, here are three equivalent commands:
$ git diff HEAD^^ HEAD main.c
$ git diff HEAD^^..HEAD -- main.c
$ git diff HEAD~2 HEAD -- main.c