QuickSnip
Browse
Tags
+ New
← Back to snippet
Edit snippet
Title
Description
(optional)
Undo a git commit while keeping your changes staged.
Language
JavaScript
TypeScript
JSX
TSX
Python
Go
Rust
Bash
SQL
CSS
HTML
JSON
YAML
Markdown
Tags
Loading tags…
Code
# Undo the last commit but keep the changes staged git reset --soft HEAD~1 # Or undo and unstage the changes (working tree preserved) git reset HEAD~1
Update snippet
Cancel