Answers for "undo commit \"

60

undo commit

# KEEP CHANGES
git reset --soft HEAD~1

# REMOVE CHANGES
git reset --hard HEAD~1
Posted by: Guest on April-07-2020
0

how to undo local commit git

If your commits are only LOCAL, 
you can git reset --hard origin/<branch_name> 
to move back to where the origin is.
Posted by: Guest on October-31-2021

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language