Engineering
Rebase a pull request and fix the conflicts
Mention Merlin on a pull request that conflicts with main. It rebases the branch, resolves the conflicts, runs the tests and pushes.
@Merlin from now on, when someone asks you to rebase a pull request in this repository, rebase its branch onto main, resolve the conflicts keeping what both sides meant to do and run the tests. Push the rebased branch to the same pull request and reply with how you resolved each conflict. If a conflict needs a decision about behavior or the tests fail after the rebase, ask in the thread before pushing.
- Starts whenSomeone mentions
@usemerlin-aion a pull request that conflicts withmain Merlin worksClaude Code or Codex rebases the branch onto
main, resolves each conflict and runs the tests on a teammate's machine- You getThe rebased branch pushed, with a reply explaining how each conflict was resolved
Tools
- GitHub
Capabilities
- Integrations
How it works
From a conflicting branch to a rebased one, with each conflict explained.
Mention
@usemerlin-aion the pull request that conflicts withmainand ask for a rebase. Teammates can say in the thread what to keep.Claude Code or Codex rebases the branch onto
mainon a teammate's machine, resolves each conflict keeping what both sides meant to do and runs the tests.The rebased branch is pushed to the same pull request, with a reply on how each conflict was resolved. If a conflict needs a call about behavior, Merlin asks in the thread before pushing.
Mention @usemerlin-ai on the pull request that conflicts with main and ask for a rebase. Teammates can say in the thread what to keep.
Claude Code or Codex rebases the branch onto main on a teammate's machine, resolves each conflict keeping what both sides meant to do and runs the tests.
The rebased branch is pushed to the same pull request, with a reply on how each conflict was resolved. If a conflict needs a call about behavior, Merlin asks in the thread before pushing.
acme/web
Type/to searchPShow prices in the customer's currency#609Code
Openpriyawants to merge 4 commits intomainfrompriya/local-currency
samcommented 1 hour agoMember
Looks good. It conflicts with main now that the pricing refactor landed, so it needs a rebase before we merge.
Before and after
Conflicts stop holding up a pull request that's ready.
Without Merlin
The author drops what they're doing, rebases by hand and works out what each side of every conflict meant.
- 01See the conflict warning
- 02Stash your current work
- 03Fetch the latest main
- 04Start the rebase
- 05Read the pricing refactor
- 06Resolve format.ts
- 07Resolve plan-card.tsx
- 08Continue the rebase
- 09Run the test suite
- 10Push the rebased branch
- 11Explain each resolution
With Merlin
One mention gets the branch rebased and each conflict explained, so the reviewer can get back to merging.
@usemerlin-aion the conflicting pull requestAsked by the author on GitHubRebases and resolves on Priya's MacBookCodex runs the tests after the rebase
- Rebased branch and a note per conflictChecks run again on the push
Setup
Install the GitHub app, then hand off rebases.
Set this up once and anyone can ask for a rebase on any pull request in your repositories. When a conflict needs a call about behavior, Merlin asks in the thread before it pushes.
- 01Connect a machineRuntimeInstall the Merlin desktop app or CLI on a computer running Claude Code or Codex. You can also use a machine a teammate shares with your workspace.
- 02Install the GitHub appIntegrationsPick the repositories Merlin can access. It sees mentions, reads the pull request and replies in the thread. Pushes use the machine owner's own Git access.
- 03Paste the setup promptGuidanceAn owner or admin sends the prompt below to @Merlin once, and it becomes workspace guidance for every future run.
Prompt
Tell Merlin how to rebase a pull request.
@Merlin from now on, when someone asks you to rebase a pull request in this repository, rebase its branch onto main, resolve the conflicts keeping what both sides meant to do and run the tests. Push the rebased branch to the same pull request and reply with how you resolved each conflict. If a conflict needs a decision about behavior or the tests fail after the rebase, ask in the thread before pushing.
Once, when you paste it
- PromptYou paste the prompt to @Merlin
- GuidanceMerlin saves your rules as workspace guidance
Every time someone mentions Merlin on GitHub
- IntegrationThe GitHub app spots the mention
- RuntimeMerlin picks an available machine
- ContextThe run gathers context
- WorkClaude Code or Codex rebases and resolves the conflicts
- SteeringYour team steers the work in the thread
- ResultMerlin pushes the branch and explains each conflict
Related use cases
More engineering tasks you can hand to Merlin.
- Integrations
Engineering
Backport a fix to a release branch
Mention Merlin on a merged pull request and name a release branch. It cherry-picks the fix, runs the tests and opens the backport pull request.
@usemerlin-aion the merged pull requestA backport pull request into the release branch - IntegrationsSkills
Engineering
Fix a red CI run
Mention Merlin on a pull request with a failing check. It reads the job log, reproduces the failure and pushes a fix, or shows why the test is flaky.
@usemerlin-aion a pull request with a red checkA fix commit, or a flake verdict with evidence - IntegrationsSkillsMemory
Engineering
Address pull request feedback
Mention Merlin on a pull request and get the requested change pushed to your branch. Teammates can steer it in the comments.
@usemerlin-aiin a pull request commentCommits and a reply on the pull request
Bring your coding agents into the tools your team already uses.
Let your whole team hand work to Claude Code and Codex today. Connect one machine and add Merlin to Slack, Linear or GitHub. 14-day free trial, no API keys, no card.