I committed my work (note not pushed) in a known good state. I have since made unwanted local changes (without committing or pushing the开发者_如何学Pythonm). What is the command to undo these changes and revert to my previous commit state?
Please accept my apologies for the beginner question but the suggestions turned up by my googling seem arcane and I would like to be confident in my actions.
From Pro Git Commnuity book:
Fixing mistakes
If you've messed up the working tree, but haven't yet committed your mistake, you can return the entire working tree to the last committed state with
$ git reset --hard HEAD
精彩评论