git diff notes

From thelinuxwiki
Jump to: navigation, search

git basics.jpg


get last two commits for a particular file

$ git log -n 2 <path to file>

diff between to commits

$ diff <commit1> <commit2> <path to file>