jj-operation-restore
restore a Jujutsu repository to an earlier operation
TLDR
SYNOPSIS
jj operation restore [options] operation
DESCRIPTION
jj operation restore (alias jj op restore) creates a new operation whose view matches an earlier operation. The working copy, bookmarks, and other recorded repo state go back to how they looked then, which effectively undoes every later operation. Later operations remain in the log until you abandon them.This is time travel for the whole repository, not a commit-level restore. jj restore copies file contents between revisions; jj op restore replaces the current operation's view. jj undo walks back one (or a few) operations at a time; jj op revert applies the inverse of one operation. jj op restore jumps to a chosen snapshot.Because restore records a new operation, you can undo the restore itself with jj undo. To actually delete the skipped recent history, follow with jj op abandon <operation ID>..@-.
PARAMETERS
OPERATION
The operation to restore to. Copy an ID from jj op log. Any unambiguous prefix is enough. Use jj --at-op=id log (or st) to preview the repo at that operation before restoring.--what WHAT
Experimental. Which portions of the local state to restore (repeatable). Default: `repo` and `remote-tracking`. `repo` is the jj repo state and local bookmarks. `remote-tracking` is remote-tracking bookmarks — omit it if you want to push after the restore without resetting those refs.--help
Display help information.
INSTALL
CAVEATS
Subcommand of jj. Operation IDs come from jj op log, not from jj log. Restore does not delete later operations; it adds one that points at the older view. --what is experimental. Skipping `remote-tracking` is the usual choice when you still want to push. Preview with --at-op before restoring a large jump.
SEE ALSO
jj-operation(1), jj-operation-log(1), jj-operation-revert(1), jj-operation-abandon(1), jj-undo(1), jj-restore(1), jj(1)
