Undo Last Commit (Keep Changes)
Rewind HEAD by 1 commit while preserving all modified files as staged changes in your working tree.
# Undo commit, keep changes staged
git reset --soft HEAD~1
# Or undo commit and leave changes unstaged:
git reset HEAD~1