git reset --mixed HEAD~1

Category: Git - Core

git reset --mixed HEAD~1

Undo last commit keeping changes unstaged

Undoes the last commit and unstages the changes — files are modified but not staged. --mixed is the default.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.