3 ms·
> You'd think that's what "git reset" would to, but of course not. Ahem, the command for "Reset working directory/Discard changes/Revert to last commit" is "gi
by jlokier 6y ago
> You'd think that's what "git reset" would to, but of course not.
Ahem, the command for "Reset working directory/Discard changes/Revert to last commit" is "git reset --hard".
That's the one I use.
"git checkout -f" does the same thing, but only because their different functionality coincides when there are no other arguments. When given a non-HEAD commit-id or branch-id they do different things.
- ArneBab 6y agoThat’s a beautiful example of the problems of git :-)