Undo the last commit but keep its changes
CautionMoves the branch back one commit and leaves the changes of that commit unstaged in the working tree.
git reset HEAD~Report an issue (opens in a new tab) wrong command, wrong danger level, typo… (on GitHub)
Adapted from tldr-pages (common/git-reset.md), licensed under CC BY 4.0.