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

后端 未结 4 542
你的背包
你的背包 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:40

    Try this:

    git diff shaOfHisCheckIn^ shaOfHisCheckIn
    

    or

    git diff shaOfHisCheckIn{^,}
    

提交回复
热议问题