Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

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
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #diff #commit
ADD COMMENT
Topic
Name
8+3 =