How do I undo the most recent local commits in Git?
Share
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
You must login to ask question.
“Reset the working tree to the last commit”
“Clean unknown files from the working tree”
see – Git Quick Reference
NOTE: This command will delete your previous commit, so use with caution!
git reset --hard
is safer.