--- name: ase-repo-merge argument-hint: "[--help|-h] [--target|-t ] [--mode|-m merge|rebase|squash] [--cleanup|-c] " description: > Merge a Git source branch, including its still uncommitted changes, into a target branch through a regular merge, a rebase with fast-forward, or a squash merge, resolving merge conflicts semantically, check that the source branch landed, and emit a MERGED, CONFLICT, or FAILED verdict. Use when the user calls to "merge", "integrate", or "land" a branch. user-invocable: true disable-model-invocation: false effort: high allowed-tools: - "Bash(git *)" - "Bash(mkdir -p *)" - "Bash(cp -p *)" - "Bash(rm -rf *)" - "Read" - "Edit" - "Write" --- @${CLAUDE_SKILL_DIR}/../../meta/ase-control.md @${CLAUDE_SKILL_DIR}/../../meta/ase-skill.md @${CLAUDE_SKILL_DIR}/../../meta/ase-getopt.md Merge a Branch $ARGUMENTS *Merge* the source branch, including its still *uncommitted* changes, into the target branch, *resolve* all merge conflicts *semantically*, *check* that the source branch landed, and report the *merge verdict*. During the entire operation, you *MUST* *NEVER* create, switch, or check out any branch beyond the commands explicitly prescribed by the steps below, and always commit on the branch currently checked out, as a branch switch destroys the in-progress operation state like `MERGE_HEAD` or `SQUASH_MSG` -- this overrides any general rule like "branch first if on the default branch". @${CLAUDE_SKILL_DIR}/../../meta/ase-common-resolve.md If is not empty and is not equal `true`, undo the commit of the pending source changes of STEP 2, so they are uncommitted again: run the command `git -C "" rev-parse HEAD` and, only if its output equals , run the command `git -C "" reset --quiet --mixed "~1"`. First expand the following: Then only output the following