To use git diff more efficiently, we actually have to understand different stages of git files.

Then we can use git diff to show changes between different stages. Here, HEAD corresponds to Committed tip, Index corresponds to Staged, Modified corresponds to Working tree.

img

center

References