What does this command compare?
git diff --staged
- The working tree against the index
- The working tree against the last commit
- The local branch against its upstream
- The index against the last commit
--staged (same as --cached) shows what the next commit would contain compared with HEAD. Plain git diff compares the working tree with the index.