Undo & the operation log
jj records every change to the repository as an operation: a describe, a rebase, a squash, a fetch, a bookmark move. The list of operations is the operation log, and it’s what makes everything in Wyrm undoable.
Undo and redo
Section titled “Undo and redo”- Click Undo in the top bar (its tooltip names the operation it will undo), or press
⌘Z. - Press
⌘⇧Zto redo.
Each undo steps back one more operation. Inside a text field, ⌘Z undoes your typing instead.
Undo changes your local repository only. Commits you’ve already pushed stay on the remote; push again after undoing if the remote should follow.
The Operations panel
Section titled “The Operations panel”Click Operations (the clock) in the icon rail. Newest operations are at the top. All, Commits and Refs filter the list, and the header has Undo, Redo and refresh buttons.
See what an operation changed
Section titled “See what an operation changed”Click the chevron on a row (Show what this operation changed). Wyrm lists the bookmarks, tags and working copy the operation moved, each as before → after, plus the full operation description. If it moved none of them, you see “No bookmark, tag, or working-copy changes.”
Restore to an operation
Section titled “Restore to an operation”Click a row to put the whole repository back the way it was right after that operation. Wyrm asks first (Restore to this operation?). Later operations stay in the log, so a restore is itself undoable.
The row’s ⋯ menu has narrower versions:
- Restore commits and bookmarks only
- Restore remote-tracking bookmarks only
Time travel: look before you restore
Section titled “Time travel: look before you restore”Not sure which operation you want? Look first.
- In the Operations panel, open a row’s ⋯ menu and choose View the repository at this operation.
- The log now shows the repository as it was then, under a Past operation banner with the operation’s description and time.
- Use Older and Newer in the banner to step through the history.
- Click Restore to here to make that state current, or Return to present to go back without changing anything.
While you’re looking at the past, everything is read-only: dragging, edit menus and toolbar actions are off until you return. If you try anyway, Wyrm says “Not available while viewing a past operation” and offers Return to present.
Nothing is lost
Section titled “Nothing is lost”Abandoning a commit, forgetting a workspace or rewinding with a restore doesn’t destroy anything: the old state is still in the operation log. If something has vanished from the log graph, it’s almost always one undo or one restore away.
The jj equivalents are jj undo, jj redo, jj op log, jj op show, jj op diff and jj op restore; you can run them in the built-in terminal too.