I am newbie with git. It tried this tutorial, but after the command, i get this error:
[root@WL-0022150E7BD4 alma]$ git diff --cached
fatal: No HEAD commit to compare with (yet)
I created two file in the current directory. I dont understand, it is the first step in the tutorial.
It’s not the first step in the tutorial: you should have done
git init,git add .(with at least some files in the working directory),git commitand anothergit addbefore you do a gitdiff --cached.Provided that there wasn’t an error in the commit step,
git diff --cachedshould not give you this error.