jj-operation-abandon
abandon operations from Jujutsu's operation log
TLDR
SYNOPSIS
jj operation abandon operation
DESCRIPTION
jj operation abandon (alias jj op abandon) removes operations from Jujutsu's operation log. Every mutating jj command records an operation; abandoning those records is how you shrink the log and make old commits, views, and predecessors eligible for garbage collection.To discard old history, pass a range ending at the last operation you want gone: jj op abandon ..<operation ID> abandons that operation and all of its ancestors. Descendants of the abandoned operations are reparented onto the root operation so the remaining log stays connected.To discard recent history after a restore, first run jj op restore <operation ID>, then jj op abandon <operation ID>..@-. Restore creates a new operation that points the repo at the earlier view; abandon then drops the now-unwanted later operations from the log.Previous versions of a change (predecessors) are also discarded when they become unreachable from the operation history. The abandoned operations, commits, and other unreachable objects can later be collected with jj util gc. This is not jj abandon, which hides revisions in the commit graph rather than operations in the operation log.
PARAMETERS
OPERATION
The operation or operation range to abandon. Range syntax such as `..<id>` (ancestors through that operation) and `<id>..@-` (from that operation up to the parent of the current operation) is accepted.--help
Display help information.
INSTALL
CAVEATS
Subcommand of jj. Operation IDs come from jj op log, not from jj log. Abandoning is not the same as jj undo or jj op restore: those create new operations; this removes operations. After a large abandon, run jj util gc if you want the on-disk objects reclaimed. Do not confuse this with jj abandon, which abandons revisions.
SEE ALSO
jj-operation(1), jj-operation-log(1), jj-operation-restore(1), jj-operation-revert(1), jj-abandon(1), jj-undo(1), jj(1)
