Re:Git Internals, Techniques, and Rewriting History
by pjc50 on Monday October 21, 2019 @08:26AM
(#21311441)
Not quite: if you stage something, it no longer appears in "git diff" and you have to use "git diff --cached" to show it. One of those things which I trip over occasionally.
"git diff --cached" = staging vs. HEAD
"git diff" = workspace vs. staging (but when nothing is staged, staging == HEAD)
"git diff --cached" = staging vs. HEAD
"git diff" = workspace vs. staging (but when nothing is staged, staging == HEAD)
(I think?)