> ## Documentation Index
> Fetch the complete documentation index at: https://2026commitplusinc.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Undo Action

> Tower-style undo/redo for stage, commit, stash, branch, discard, and remote actions.

<video
  controls
  src="https://mintcdn.com/2026commitplusinc/OlGhH2PWWQXoSXQe/showcase/undo-checkout-branch.mp4?fit=max&auto=format&n=OlGhH2PWWQXoSXQe&q=85&s=c9181a479f70038fce99a281c511984c"
  autoPlay
  muted
  loop
  playsInline
  preload="auto"
  disablePictureInPicture
  aria-label="Undo checkout branch"
  style={{
width: "100%",
aspectRatio: "2520 / 1164",
borderRadius: "8px",
display: "block",
backgroundColor: "#f3f4f6",
}}
  data-path="showcase/undo-checkout-branch.mp4"
/>

Commit+ treats undo as a first-class workflow, not a tiny safety net. Press `Cmd+Z` to undo supported Git actions, and `Cmd+Shift+Z` to redo.

## What's undoable

* Stage / unstage (file, hunk, and line level)
* Commits
* Stash save / drop / apply / pop
* Local branch actions (create, delete, rename, switch)
* Discard / remove (backed up in `.git/macgit/undo`)
* History actions: cherry-pick, revert, reset, merge, rebase
* Remote actions: pull rollback, published branch removal

## Guarantees

* An undo entry is registered **only after** the original Git action succeeds.
* Every undo/redo refreshes repository state and posts a change notification.
* Destructive inverses verify the expected state before running; on a failed precondition the entry is restored and an error is shown.
* Undo stacks are not persisted across app launches.

## Product direction

The long-term goal is that every meaningful mutating Git workflow in Commit+ either registers a safe undo entry or clearly explains why it cannot. The current implementation focuses on the action families listed above.
