Guide contents

Merging goals

Sooner or later two lines of work need to become one. You and a teammate built on the same starting point, or you let two agent sessions run in parallel and both produced something worth keeping. Merging takes two goals and joins them into a single line, keeping both histories intact.

Starting a merge

Merging happens on the Map. Click the Merge button at the top right of the map view — a pill appears saying "Select two goals to merge" with a 0/2 counter. Click two goals to pick them. They have to come from different lines of history; if you pick two goals on the same line, Merget tells you to choose a goal from a different line. Click a selected goal again to deselect it, or close the pill to back out — nothing has happened yet.

Press Merge in the pill and a dialog asks how you want to do it:

  • Merge manually — Merget runs the merge now and walks you through any conflicts right in the app.
  • Hand it to an agent — pick Claude, Cursor, Codex, or GitHub Copilot. Merget copies a prepared merge prompt and opens the tool so the agent can resolve everything, with the full context of both sides. If your agent isn't listed, copy the same prompt and paste it anywhere. See Agents.

The manual flow

If the two sides never touched the same code, the merge completes on the spot — a status pill confirms it ("Goals merged," or "Fast-forwarded" / "Already up to date" when one side already contains the other).

When both sides changed the same parts of a file, you get the conflicts dialog. It shows one conflicted file at a time ("Conflict 1 of 3"), and for each side it shows which goal produced that side's change — the goal's title and description — so you're deciding between intentions, not just between blobs of text.

For each file you can:

  • Accept A or Accept B — take one side's version whole.
  • AI resolves — pick an agent (or copy a prepared prompt) to resolve just this file.
  • Resolve by hand — open the file in VS Code or Cursor straight from the dialog. The conflicted regions are marked with the familiar <<<<<<< / ======= / >>>>>>> markers: your side on top, the other side below. Edit the file into the shape you want and delete the markers.

Abort merge is always available in the footer. It asks for confirmation, then reverts any choices you've made so far and returns the repository to its pre-merge state — aborting is safe and loses nothing from either goal.

Finishing

After the last conflict, Merget asks you to name the result. When the two sides live in different goals, the merge creates a new goal (with a new prompt inside it) to hold the joined work — you give both a title. When they're closer together, you name less or nothing at all. Merget refuses to finish while any file still contains conflict markers, so a half-resolved file can't slip through.

The merged result is a new step with both lines as its parents — on the Map you'll see the two paths flow together. The original goals are left exactly as they were; merging adds history, it never rewrites it.

A status pill keeps you posted throughout: "Conflict resolved" after each choice, "Goals merged" at the end, or an error message if something refuses.

Under the hood

Merget performs a three-way merge: it finds the most recent step the two sides have in common (the base) and compares each side against it. A conflict only exists where both sides changed the same region of the same file since that base — everything else merges automatically. The "Accept A / Accept B" goal cards work because every change in Merget is attributed to the goal and prompt that produced it, so the dialog can show the committed intent behind each side. The final merge step references both parents, which is what makes the joined history traceable in both directions.


Next: Agents · Related: The Map · The history model · Agents