⬡Undo & squash
A one-button escape hatch for "that wasn't what I meant", and a quick way to fold a commit into its parent.
Undo last operation undo.last
The toolbar express lane that does the right thing depending on repo state.
Entry points
- ToolbarA contextual amber "Undo merge / rebase / reset / pull" button — it slides in only when something is actually undoable (an op paused mid-rebase, or after a completed merge / rebase / reset / pull / un-pushed sync) and disappears after undoing. (The permanently-visible Undo was removed in 0.2.7.)
iOperations that don't set
ORIG_HEAD (e.g. cherry-pick) deliberately never offer it — undo rewinds to ORIG_HEAD, which would be a stale target. The reflog remains the deep-history recovery tool.What happens next
- If a merge / rebase / cherry-pick / revert is in progress, it aborts that operation.
- Otherwise it rewinds to
ORIG_HEADwithreset --hard— the state before the last merge/rebase/reset/pull. - A dirty tree is auto-stashed first, so nothing is lost.
Squash with parent commit.squash
Folds a commit into its parent — the two become one, messages combined — via the interactive-rebase machinery.
Entry points
- Commit menuSquash with Parent.
Full flow (with confirmation and pause-on-conflict) on the history rewriting page.