When I stage a file, "git status" then mentions that, to UNstage that file, I can do "git reset HEAD filename". But I have also seen instances in which the recommended command is "git reset -- filename".
Sorry, I do not remember the superficial differences between when I have seen "--" recommended instead of "HEAD" but I just now ran a test, in which I attempted to UNstage a file 2 separate times: once using "HEAD" and once using "--", and I cannot see the difference in the results.
(Unless it's absolutely necessary, in order to give me a truly accurate answer, I'm not interested in subtleties about the differences between "HEAD~" and "HEAD~1"; etc; etc. --because I seem to rarely-or-never see those subtleties mentioned in the automatic recommendations that pop up.)
Thanks.
I can't figure out the official way to accept Karl Knechtel's 3rd comment as the best answer; so, I am adding this "answer" in order to say that:
From the top answer: "If the paths aren't provided, the entire tree is reset, and if the commit isn't provided, it's taken to be HEAD (the current commit)." From my comment (which is supposed to be about general conventions that are not to do with Git): using -- means that is actually a filename. Applying logical reasoning: with git reset -- , the commit wasn't provided (the -- was used to make the next thing be a filename instead of a commit); therefore, the commit is taken to be HEAD. I.e.: Yes, it's the same thing. – Karl Knechtel (13 hours ago)
Thanks, Karl!