`git reset --hard` resets your worktree to the HEAD state.
`git checkout -- <file>` checks out the HEAD version of a given file.
`git checkout -- <file>` checks out the HEAD version of a given file.
A:
`git reset --hard` checks out the HEAD version of your worktree.
`git checkout -- <file>` checks out the HEAD version of a given file.
B:
`git reset --hard` resets your worktree to the HEAD state.
`git checkout -- <file>` resets a file to the HEAD state.
I don't think a newbie could even grok the difference between these three descriptions.
git reset --hard HEAD
Does in fact only modify the work tree, since updating the current branch to HEAD is a nop.> I don't think a newbie could even grok the difference between these three descriptions.
This part is definitely true - Git offers only a very light abstraction on top of its data structures.