gitq abort
Aborts the in-progress rebase behind a paused cascade and releases its lease.
Usage
bash
gitq abort [--stack <name>]
Flags
| flag | meaning |
|---|---|
--stack <name> | Which parked cascade to abort, when more than one stack is parked. Resolved the same way as gitq continue. |
Behavior
- Finds the parked lease exactly as
continuedoes (findParkedLease,src/cli/slots.ts:135-146), and fails the same way when nothing or too much is parked:nothing to continue (no parked cascade)(the message says "continue" even though you ranabort), ormultiple parked cascades; pass --stack to pick one. - Aborts the rebase wherever it actually lives: the pause file's tree when one exists (
pauseInfo.worktreePath ?? pauseInfo.treePath), else the leased work slot -- and only when a rebase is actually in progress there. Then clears the pause file, detaches the work slot's HEAD, and releases the lease (src/cli/commands/cascade.ts:110-138). - Unlike
continue, it does not require the pause file to exist. If it is missing entirely,abortfalls back to the leased work slot, never the repo root, and skips the rebase abort itself when that slot has no rebase in progress -- it still clears the pause file and releases the lease either way. - Prints
abortedand exits0on success. - Never exits
2. Exit2has exactly one source in the codebase,finishCascade(src/cli/commands/cascade.ts:45), and onlysync,continue, and reparent's follow-up cascade route through it.abortnever callsfinishCascade. - Never writes an operation-log entry. A paused cascade was never logged either, so there is nothing for
gitq undoto give back for the branch that was mid-rebase; the branches the cascade already finished before it paused stay exactly where they were rebased to. - Under
--json, emits{ state: "aborted" }, always, whether or not a pause file existed. See JSON output.
Exit codes
0: aborted.1: nothing parked, multiple parked without--stack, or an unexpected failure clearing the pause file or releasing the lease.
See Exit codes for why 2 is not on this list.
See also
- The pause protocol: what
abortdoes and does not undo. - Recover from a mistake: a real run of
syncpausing, thenabortclearing it. gitq continue,gitq sync.