go back to last state of commit git code example Example: how to revert to last commit git reset --hard