Goal
Run a merge, rebase, or rebase --onto sequence from the current branch with explicit inputs, optional review pauses, and a completion summary. Follow every step even when the repository appears clean so results stay consistent and traceable.
Conventions
The git-merge instructions own workspace preparation, the operation commands, conflict resolution, finishing steps, and the no-push guardrail. Apply them at every step below.
Inputs
operation(optional, defaultmerge):merge,rebase, orrebase-onto.branch(required): the branch or ref to merge, or the rebase target. Ask for it when it is missing.onto(required forrebase-onto): the new base.upstream(optional, used byrebase-onto): the branch or commit that bounds the commits to move.conflict-stop(optional, defaultfalse): whentrue, pause after each set of conflict fixes for user review before continuing.
Flow
- Resolve the inputs. Ask for
branchwhen it is missing, and forontowhenoperationisrebase-onto. Record the active branch and the inputs. - Prepare the workspace as the git-merge instructions define, then run the command they define for the selected
operationand capture its output. Without conflicts, continue at step 5. - Resolve conflicts as the instructions define, and keep each file's resolution and rationale for the summary.
- Honor review pauses. When
conflict-stopistrue, summarize the fixes with a checklist of touched files and wait for explicit user confirmation before continuing. Answer follow-up questions and adjust resolutions from user feedback. - Continue or complete the operation as the instructions define, or abort when the user directs it.
- Summarize the operation, each conflict and how it was resolved with linked files, the stash state, and any remaining manual follow-up. Remind the user that nothing was pushed and that they publish the branch when ready.
Success Criteria
- The operation path completed with every conflict resolved, or was aborted at the user's direction.
git status --shortreports no pending changes, or the summary names deliberate follow-up items.- The user received a conflict summary with linked files and a reminder that pushing remains their responsibility.