Git · History and recovery
git reset --soft
Moves the branch back while keeping changes staged, ideal for re-splitting a commit.
Syntax
git reset --soft HEAD~1Example
Example
git reset --soft HEAD~1 git status
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.