What is the difference between git diff HEAD and git diff --staged? I tried both but both give the same output.
git diff HEAD
git diff --staged
You can also get different output from the two diff commands if you are running them on an unsuccessful merge, i.e. unmerged paths.
I have not been able to find out why it behaves like this, but you could read more about it here