Git - easiest way to see diff with previous version if I have the sha

后端 未结 4 541
你的背包
你的背包 2020-12-15 02:58

A colleague of mine checked in some changes to Git, and I want to see exactly what those changes were. In other words, the diff between his check-in and its parent.

4条回答
  •  囚心锁ツ
    2020-12-15 03:35

    If you want to view the diff visually in kdiff3, meld, kompare, xxdiff, tkdiff, diffuse

    git difftool --dir-diff shaOfHisCheckIn^!
    
    git difftool --tool=meld --dir-diff shaOfHisCheckIn^!
    
    git difftool -t meld -d shaOfHisCheckIn^!
    

提交回复
热议问题