What are the differences between these git diff commands?

Viewed 14969

What are the differences between the following git commands?

  1. git diff HEAD
  2. git diff HEAD^
  3. git diff --cached or the synonym git diff --staged
  4. git diff
5 Answers
Related