From gh-ops
Resolves merge conflicts on a GitHub PR: checks status/reviews, checks out branch, merges or rebases, edits conflicted files, pushes, and verifies mergeability.
How this command is triggered — by the user, by Claude, or both
Slash command
/gh-ops:fix-conflict <PR_URL>This command is limited to the following tools:
The summary Claude sees in its command listing — used to decide when to auto-load this command
# Resolve Merge Conflicts Resolve merge conflicts on a PR branch. ## Steps ### 1. Check conflict status and reviews Determine the resolution strategy: - **Human reviews exist** → use merge (Step 2a). Rewriting history loses review context. - **No human reviews** → use rebase (Step 2b). Keeps history clean. ### 2a. Resolve via merge (human reviews exist) Resolve conflicts in each file, then: ### 2b. Resolve via rebase (no human reviews) Resolve conflicts in each file, then: ### 3. Verify Confirm mergeable is "MERGEABLE".
Resolve merge conflicts on a PR branch.
gh pr view $ARGUMENTS --json headRefName,baseRefName,mergeable,mergeStateStatus,reviews --jq '{headRefName,baseRefName,mergeable,mergeStateStatus,humanReviews:[.reviews[]|select(.author.is_bot==false and .authorAssociation!="NONE")]}'
Determine the resolution strategy:
gh pr checkout $ARGUMENTS
git fetch origin
git merge origin/<baseRefName>
Resolve conflicts in each file, then:
git add <resolved files>
git merge --continue
git push
gh pr checkout $ARGUMENTS
git fetch origin
git rebase origin/<baseRefName>
Resolve conflicts in each file, then:
git add <resolved files>
git rebase --continue
git push --force-with-lease
gh pr view $ARGUMENTS --json mergeable,mergeStateStatus
Confirm mergeable is "MERGEABLE".
npx claudepluginhub p/mh4gf-gh-ops-claude-plugins-gh-ops/conflictsResolves git merge conflicts during rebase: checks status, edits conflicted files to remove markers and combine changes, stages them, and runs git rebase --continue. Repeats for further conflicts.
/resolve-reviewFetches unresolved PR review threads from GitHub, proposes AI-driven code fixes with user confirmation, runs tests with bounded retry, and commits with a [review] tag.