Skip to content
Errors
Commands
Flags
Config
Cheat sheets
Changes
Compat
Codes
Compare
Glossary
Search
Ctrl K
Browse
Error Messages
Commands
Flags & Options
Config Reference
Cheat Sheets
Version Changes
Compatibility
Codes & Tables
X vs Y
Glossary
All tools
Home
Commands
Git
Version control
Git Commands
Distributed version control system.
All Git pages
git reset --soft HEAD~1: undo the last commit, keep the changes
Undo the last commit and keep its changes staged with git reset --soft HEAD~1. --mixed unstages them, --hard deletes them. Undo a reset with the reflog.
Esc