Closed humitos closed 8 years ago
Should be good as-is, doesn't seem like a step is missing.
When testing out the git diff --cached
we're seeing the diff of a file ready to commit. Nothing currently in the working directory.
Then we continue on to the git diff HEAD
section.
The intro mentions adding in extra changes, while not yet committing those already on the stage from the previous section.
So we now have changes to the one file in working directory, stage and HEAD (or the last commit).
Looks like @randomecho solved this yearrrrs ago. thanks again!
If you go forward the tutorial and get to http://gitref.org/basic/ following all the previous steps you will get different results in comparation with the tutorial.
I think that you need to run at least once "git commit" to be able to use these command "git diff HEAD" and "git diff --cached"
See you, thanks.