Undo
Timeline and named points
11 min read
Ctrl+Z undoes one operation at a time, without showing first what will change. The timeline shows the same stack as a list over time: each operation with what it changed (branches, tags, stashes, files), the operations already undone and the named points. Pick an operation in the past and Go back to here undoes all the ones that came after it, in the right order, showing each step and the final state first.
Named points solve Ctrl+Z's other limit: the stack is lost when you close the app. A point keeps the whole state of the repository inside the repository itself, and you go back to it whenever you want.
- Toolbar: the timeline icon ("Timeline: undo, named points and local history (Alt+Z)").
- Shortcut: Alt+Z. Pressing it again closes it. Alt+H opens the same window on the Local history tab.
- Palette (Ctrl+P): "Undo timeline" ("See undone and redone operations, go back several steps at once").
The Timeline window has two tabs: Operations (this page) and Local history (Local file history). Close it with the X ("Close (Esc)") or Esc. It opens even with an operation in progress in the app; the action buttons wait for the operation to finish.
The left column shows, from top to bottom:
- The undone operations, dashed and with the undone badge (tooltip: "Undone operation: Ctrl+Shift+Z redoes it"). They're the ones Ctrl+Shift+Z would redo.
- Now: the current state of the repository.
- The operations done and the named points, from most recent to oldest, with the time.
Each operation shows its name (the same as in the Ctrl+Z notice, such as "Merge feature/login") and badges with what it changed, for example "main → feature/login" (checkout), "main moved", "+ hotfix" (branch created), "− antigo" (branch deleted), "2 tags", "+ 1 stash", "3 files". At the top, the Mark point… button and the count "5 operations to undo". At the bottom, the reminder: "Operations stay here while the app is open (up to 40 per repository). Named points are stored in the repository and remain after you close the app."
- Now: "Current state", the branch ("On branch main") and the SHA; the explanation of named points with the Mark point… button; and How it works: "Every operation in the app (commit, merge, rebase, checkout, discard…) shows up here. Click an operation to see what it changed and go back to it: the app undoes them one by one, from the latest to the chosen one, like pressing Ctrl+Z several times. Undone operations appear at the top, dashed, and can be redone."
- An operation: the name, the date and the What this operation changed section, with each reference ("Checkout: feature/login → main", "main: a1b2c3d → b2c3d4e", "Branch hotfix created", "Tag v1.2.0 created", "1 more stash", or "No branch, tag or stash changes.") and, when there was a copy, "Saved a copy of 3 files before touching them." In a branch stack operation, "Stack configuration: 2 keys" also shows up. Below, Go back to here or Redo up to here.
- A named point: see the "Go back to a point" section, below.
Use the arrow keys to move through the list.
Undoes, all at once, the chosen operation and all the ones that came after it, from the most recent to the oldest. It's the same as several Ctrl+Z in a row, except that you see each step first and where you'll end up.
- Timeline › click an operation below Now › the Go back to here section.
- Open the timeline (Alt+Z) and click the oldest operation you want to undo.
- Read the plan: "Undoes 3 operations, from the latest to this one, in this order:". Each step says
what changes in the files:
- "2 files change on disk:", with the list and the kind of change (Appears, Changes, Goes away);
- "1 file comes back as a staged change (its content on disk doesn't change):" (undoing a commit);
- "The stage goes back to what it was.";
- "No files change."
- Check In the end: the final effect on branches, tags and stashes. Notes such as "Undoing a commit keeps its changes staged: nothing is lost." explain each step's mode.
- Click Go back to here (undo 3 operations). The indicator shows "Undoing 3 operations…" and the notice confirms "3 operations undone."
Each step is the same undo as Ctrl+Z (see Undo and redo). The preview only reads the repository: it compares each step's trees, without applying anything.
git diff --name-status --no-renames <before> <after> # what each step changes in the files
The undone operations move to the top of the list, dashed. Redo them one by one with Ctrl+Shift+Z or all of them with Redo up to here.
- If the first step would be refused right now, the preview shows the reason (the same text as Ctrl+Z, such as "There are uncommitted changes. Stash or commit them before undoing this operation.") and the button is disabled.
- "The repository changed outside the app between this operation and the next one (a commit from the terminal, another tool…): the app will stop before this step.": a step in the middle won't be possible.
- "This step moves HEAD after an earlier step brought back uncommitted changes: if they're still there, it will be refused and the app stops here."
- If a step is refused along the way, the app stops there: "Stopped after 1 of 3 steps, at "Merge feature/login": …". The steps already done stay done and can be redone.
- "The undo stack changed since the preview. Pick the operation again.": another operation went into the stack while the preview was open.
- The steps taken during a stopped merge, rebase, cherry-pick or revert (resolving a conflict, discarding) can also be undone from here, with the operation still stopped: the preview lists the files that go back. If the operation finished or restarted since the step, the preview shows "The operation this was done in is no longer as it was (it was finished, aborted or restarted): this step can no longer be undone." See Operations stopped midway.
Redoes, in the order they were made, the undone operations up to the chosen one.
- Timeline › click a dashed operation (above Now) › the Redo up to here section.
- Click the undone operation up to which you want to redo.
- Read the plan: "Redoes 2 operations, in the order they were made, up to this one:". When you redo a commit, the step says "1 file leaves the stage and goes back into the redone commit (its content on disk doesn't change):".
- Click Redo up to here (2 operations). The indicator shows "Redoing 2 operations…" and the notice confirms "2 operations redone."
- A new operation (a commit, a checkout) erases the undone ones: they disappear from the list.
- The same refusals as Go back to here apply here.
A named point saves the current state of the repository: the branches, the tags, the stashes, HEAD,
the files with uncommitted changes (including new ones, except those .gitignore ignores) and the
stage. Marking doesn't change anything in the repository you see. Use it before something risky: a
big rebase, a branch cleanup, an experiment you may want to throw away.
The point stays in the repository itself and remains there after you close the app. It's not a stash snapshot: the snapshot keeps only the uncommitted changes, in an entry of the stash list; the point keeps the whole state and stays out of the list.
- Timeline: the Mark point… button at the top of the list, or in the detail of Now.
- Palette: "Mark a named point…" ("Save the current state (branches, files and stage) to go back to later").
- Click Mark point….
- In the Mark a named point dialog ("Saves the current state (branches, tags, stashes, files and stage) to go back to later. Nothing changes in the repository."), write the Name. The field comes with the date, like "Point at 26/11/2026 14:30".
- Click Mark. The indicator shows "Marking the point…" and the notice confirms "Point "Before the rebase" marked."
- The point shows up in the list with the flag, the point badge and, if there were uncommitted changes, the with uncommitted changes badge.
The app writes a copy of the working directory and the stage, without touching your stage, and an
"anchor" commit whose parents are that copy, HEAD, the tip of each branch and each stash at that
moment. The anchor's tree keeps a state.json with the state and the index. Everything is reachable
from the point's reference:
git update-ref refs/versora/points/<id> <anchor>
git for-each-ref refs/versora/points # the points, from the terminal
The refs/versora/points/* references don't show up in the graph, don't go with the push, and
git gc doesn't delete what they keep. They're shared by all the repository's worktrees, but each
point remembers the worktree it was marked in: the timeline shows only the points of the open
worktree.
Marking doesn't change the repository and doesn't go into Ctrl+Z. If you don't want the point, delete it (below).
- "Give the point a name.": the name can't be empty.
- "The repository has no commits yet: make the first commit before marking a point."
- "A rebase is in progress. Finish or abort it first.": you can't mark a point in the middle of a merge, rebase, cherry-pick or revert.
Takes the repository back to the point's state: branches, tags, HEAD, stashes, files and stage. First, the app keeps a copy of everything as it is now, and Ctrl+Z undoes the whole thing.
- Timeline › click the point in the list › the Go back to this point section.
- Click the point. The detail shows the date, the branch and the SHA from that moment.
- Read the Go back to this point preview:
- what changes in HEAD, in the branches and in the tags;
- "4 files change on disk", with the list;
- "The stage goes back to what it was at the point (2 files change).";
- "1 untracked file created after the point stays as it is.";
- "The stash created after the point stays in the list.";
- "Created after the point and kept: hotfix, v1.3.0";
- or "The repository is already as it was at the point: nothing to change."
- If you want, check Also delete branches and tags created after the point. If there are branches or tags to delete, the button turns red.
- Read the reminder: "Before going back, the app saves a copy of everything as it is now: Ctrl+Z undoes the whole thing, files included."
- Click Go back to this point. The indicator shows "Going back to the point "Before the rebase"…" and the notice confirms "Back at the point "Before the rebase". Ctrl+Z undoes it."
| Option | What it does | Default |
|---|---|---|
| Also delete branches and tags created after the point | Without it, branches and tags that didn't exist at the point stay as they are. With it, they're deleted. | Unchecked |
- It saves the backup copy of the current state (as with Ctrl+Z, in
refs/versora/undo/*). - Branches and tags go back to where they were at the point; the ones deleted afterwards exist again.
- HEAD goes back to the point's branch (or commit), with a forced checkout: the files come from the point's copy right after.
- The point's stashes go back to the list; the ones created afterwards stay in it.
- The files and the stage are replaced with the point's.
git checkout -f feature/login --
git restore --source=<point-copy> --worktree -- .
Untracked files created after the point stay on disk: git restore doesn't delete files git
doesn't track.
Ctrl+Z undoes the whole thing, files included. In the timeline, it shows up as "Back to point "Before the rebase"", with the point badge.
- "The repository changed since the preview. Check the preview again before going back to the point.": something changed between reading the preview and clicking.
- "Git no longer has this point's commits (the repository was cleaned up or recreated). It can't be restored."
- "1 object from the point no longer exists (an annotated tag deleted and cleaned up by Git): it stays as it is."
- "Couldn't save a backup of the current state; nothing was changed."
- "A merge is in progress. Finish or abort it first."
- "This named point no longer exists.": the point was deleted (in another window, from the terminal).
- Timeline › click the point › the icons on the detail's title: Rename the point and Delete the point.
- To rename: click Rename the point, change the Name and confirm Rename.
- To delete: click Delete the point and confirm Delete point in the "Delete the point "Before the rebase"?" dialog.
git update-ref refs/versora/points/<id> <new-anchor> <old-anchor> # rename (writes the new name)
git update-ref -d refs/versora/points/<id> <anchor> # delete
Deleting can't be undone: "The repository doesn't change. Only the mark goes away, and this can't be undone: commits that only the point kept become unreferenced and Git removes them in its next cleanup."