git badh undu last cmmit code example Example: undo commit # KEEP CHANGES git reset --soft HEAD~1 # REMOVE CHANGES git reset --hard HEAD~1