jj-operation-revert
revert a single Jujutsu operation by applying its inverse
TLDR
SYNOPSIS
jj operation revert [options] [operation]
DESCRIPTION
jj operation revert (alias jj op revert) creates a new operation that applies the inverse of an earlier operation. The original operation stays in the log; the new one undoes its effect on the recorded repo view.This is the operation-log analog of jj revert (which inverts a commit). Use it when you want to undo one command that is not necessarily the most recent. jj undo is the usual way to walk back the latest operation(s) one-by-one. jj op restore instead replaces the current view with a whole earlier snapshot, undoing every operation after that point rather than inverting a single one.Default @ means "revert the current operation", which is close to jj undo for a single step. To invert something older, pass its ID from jj op log.
PARAMETERS
OPERATION
The operation to revert. Default: `@` (the current operation). Copy an ID from jj op log.--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 revert without resetting those refs.--help
Display help information.
INSTALL
CAVEATS
Subcommand of jj. Operation IDs come from jj op log, not from jj log. Revert adds a new operation; it does not delete history. --what is experimental. This is not jj revert, which creates a new commit that undoes a revision. Inverting an operation that had effects outside the repo (for example a jj git push) does not un-push.
SEE ALSO
jj-operation(1), jj-operation-log(1), jj-operation-restore(1), jj-undo(1), jj-revert(1), jj(1)
