Git · History and recovery
git reset --mixed
Moves the branch back and unstages changes, leaving the working tree intact.
Syntax
git reset HEAD~1Example
Example
git reset HEAD~1
More in this group
Learn this in the course
Reference pages are the quick answer. The course explains the why, shows the full example and ends with a challenge.