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
Another edge case difference: In a newly created git repo, where only git init has been run so far, git diff HEAD will result in a fatal error (ambiguous argument 'HEAD') while git diff --staged will produce no output.
git init