git diff:Working Tree、Index、HEAD 三层比较 | Git

本章覆盖:`git diff`;working tree vs index;`git diff --staged`;index vs HEAD;`git diff HEAD`;current work vs HEAD;patch;hunk;context line;`+` / `-`;commit 前必须知道自己将提交什么。

本章知识点

  • git diff
  • working tree vs index
  • git diff --staged
  • index vs HEAD
  • git diff HEAD
  • current work vs HEAD
  • patch
  • hunk
  • context line
  • + / -
  • commit 前必须知道自己将提交什么