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.

acme/web · pull requests
Get started for free
  1. Starts whenSomeone mentions @usemerlin-ai on a pull request that conflicts with main
  2. Merlin worksClaude Code or Codex rebases the branch onto main, resolves each conflict and runs the tests on a teammate's machine
  3. 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-ai on the pull request that conflicts with main and ask for a rebase. Teammates can say in the thread what to keep.

acme/web

Type/to searchP
CodeIssues8Pull requests12AgentsActionsProjectsSecurityInsightsSettings

Show prices in the customer's currency#609Code

Openpriyawants to merge 4 commits intomainfrompriya/local-currency

Conversation 5 Commits 4 Checks 3 Files changed 3+48−6

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.

  1. 01See the conflict warning
  2. 02Stash your current work
  3. 03Fetch the latest main
  4. 04Start the rebase
  5. 05Read the pricing refactor
  6. 06Resolve format.ts
  7. 07Resolve plan-card.tsx
  8. 08Continue the rebase
  9. 09Run the test suite
  10. 10Push the rebased branch
  11. 11Explain each resolution

With Merlin

One mention gets the branch rebased and each conflict explained, so the reviewer can get back to merging.

  1. @usemerlin-ai on the conflicting pull requestAsked by the author on GitHub
  2. Rebases and resolves on Priya's MacBookCodex runs the tests after the rebase
  3. 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.

  1. 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.
  2. 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.
  3. 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.

acme/web · pull requests

Once, when you paste it

  1. PromptYou paste the prompt to @Merlin
  2. GuidanceMerlin saves your rules as workspace guidance

Every time someone mentions Merlin on GitHub

  1. IntegrationThe GitHub app spots the mention
  2. RuntimeMerlin picks an available machine
  3. ContextThe run gathers context
  4. WorkClaude Code or Codex rebases and resolves the conflicts
  5. SteeringYour team steers the work in the thread
  6. ResultMerlin pushes the branch and explains each conflict

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.