News for hackers. Stuff that matters.
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)

(I think?)

Re:Git Internals, Techniques, and Rewriting History by rinchik on Monday October 21, 2019 @08:22PM (#21319085)
Yep. you are right, "but when nothing is staged, staging == HEAD" is exactly what i had in mind