Merging, rebasing, cherry-pick and revert
Merge, rebase, cherry-pick and revert share one plan model: what each one checkpoints, what it rehearses first, and how the sequencer continues, skips or aborts.
One model, four operations
Each of these follows the same path: a plan built from the real repository, a rehearsal where Git allows one, a checkpoint sized to the classification, execution, and a journal entry. The plan is not a summary of your request. Every fact in it was read out of the repository, which is why it can tell you how many commits are about to be rewritten and what their subjects are.
| Operation | Risk | Captured first |
|---|---|---|
| Merge | caution | Light checkpoint: refs, HEAD, index, patches |
| Rebase | caution | Light checkpoint: refs, HEAD, index, patches |
| Interactive rebase | caution | Light checkpoint: refs, HEAD, index, patches |
| Cherry-pick | safe | Nothing |
| Revert | safe | Nothing |
Cherry-pick and revert are classified safe because they only add commits; nothing existing stops being reachable. That is also why the plan’s rollback line for them is “abort the operation, or reset to the prior tip” rather than a capsule restore.
Merge
Fast-forward or no-fast-forward is an explicit choice, passed as --ff or --no-ff. The plan works out which one your situation actually is by asking Git whether your tip is an ancestor of the target, then says so: a fast-forward summary counts the incoming commits and says the branch moves forward with no merge commit; a merge-commit summary says conflicts are possible.
The rehearsal for a real merge runs in an isolated scratch worktree created with git worktree add --detach against the same object database, so your working tree, your index and your refs are never touched by it. Where a sandbox cannot be created, the prediction falls back to a read-only git merge-tree --write-tree computation, and the preview labels that result advisory rather than pretending it rehearsed the operation.
Rebase
The plan lists the commits that will be replayed and get new ids (before and after, with subjects) because “20 commits are rewritten” is a different decision from “these 20 commits are rewritten”. It also requires a clean working tree and refuses to start when a sequencer is already in progress.
Interactive rebase builds a real todo list and the plan surfaces the ones you dropped as commits that become unreachable, alongside everything being rewritten.
Four todo verbs in this build
Interactive rebase offers pick, squash, fixup and drop. The preview’s limitation line says exactly that, and adds the honest caveat that Git can still stop for conflicts partway through regardless of the todo you wrote.
Cherry-pick and revert
One commit or several, and reverting runs with --no-edit so the operation does not hand you an editor mid-transaction. When the commit you are picking or reverting is a merge, Git needs to know which parent to treat as the mainline; GitAegis asks and passes -m, because guessing would be wrong.
The sequencer: continue, skip, abort
When Git stops partway, the sequencer controls are first-class operations with their own plans, not buttons hidden inside an error. Which ones apply is read from Git’s own marker files rather than from what the interface thinks it started.
| Operation | Risk | Captured first |
|---|---|---|
| Continue | caution | Light checkpoint: refs, HEAD, index, patches |
| Skip | destructive | Standard capsule, untracked files included |
| Abort | caution | Light checkpoint: refs, HEAD, index, patches |
- Continue refuses while any conflicted path is still unresolved and unstaged. That is a precondition on the plan, not a runtime surprise. It applies to a merge, rebase, cherry-pick, revert or patch application.
- Skip applies to a rebase or a patch application. It is destructive because the patch you skip does not reach the rebased branch; the original commit object survives, but its changes are gone from the result unless you apply them yourself later. The plan says that in those words.
- Abort works for anything in progress, including a bisect or an unresolved apply. Git’s abort discards the edits you made to resolve the current conflict, so a checkpoint is taken first, and the plan tells you it exists.
When a rehearsal is refused
If a merge, rebase or cherry-pick is already in progress, the simulator does not rehearse a second one on top of it. The preview comes back labelled unavailable, with the reason written out: a rehearsal in that state would be meaningless, so resolve or abort the operation you are in first. Refusing to predict is treated as a legitimate answer, and it is the answer you get rather than a confident-looking guess.