<!-- Eight ways branches collide — Merget · https://merget.ai/blog/eight-ways-branches-collide -->

# Eight ways branches collide

Eight concrete merge-conflict patterns, from renamed helpers to competing writes, and how to decide which need a fix or human judgment.

Merget team · Nov 13, 2026 · 5 min read

Parallel pull requests collide in recurring ways. A textual conflict changes the same lines. A semantic conflict changes code relationships: one pull request removes something another needs, or two changes combine into behavior neither author evaluated. [Merget](https://merget.ai/how-it-works#findings) looks for eight patterns so a team can move from “these branches conflict” to a useful explanation and a fix.

The categories describe evidence, not eight guarantees of complete coverage. Precise structural findings can block. Behavioral findings may block when the evidence and repository settings support it; other findings remain advisory. Ambiguous references need review. The point is to make the next decision clearer, rather than giving every warning the same weight.

## 1. Signature drift: the caller still uses the old contract

Pull request A changes charge(total) into charge(total, currency). Pull request B adds a new checkout path that still calls charge(order.total). Each branch can be consistent with the base it started from, while the combined program has a missing argument. The resolution must decide which currency the new checkout path should pass, not simply add any value that makes the build succeed.

Argument-count checks need care. Optional and variadic arguments, ambiguous calls and identical edits on both sides can change the interpretation. Merget’s finding should point to a precise caller and changed signature, so the reviewer can assess the intended contract.

## 2. Broken reference: the name changed elsewhere

Pull request A renames formatAmount to formatMoney and updates the existing callers. Pull request B adds an invoice that imports formatAmount. The new invoice lives in a different file, so there may be no textual conflict. Once both changes land, the old export is gone. Keeping both contributions means updating the new caller to the renamed helper and checking that its behavior still fits.

## 3. Deleted dependency: a new change needs removed code

Pull request A removes legacyTax after migrating the callers visible on its branch. Pull request B adds a checkout feature that calls legacyTax. Git can combine the edits, but the combined feature depends on a deleted definition. A good resolution uses the replacement API if one exists; restoring the removed helper without understanding the migration can undo the first pull request’s intent.

## 4. Duplicate definition: two additions claim one name

Two agents independently introduce RETRY_LIMIT in the same module or fully qualified scope. One intends three retries, the other five. This can be a textual conflict, a duplicate symbol or a more ambiguous naming collision depending on the language. Before choosing a value, determine whether the agents meant one shared policy or two separate policies that happen to have the same name.

This is where blindly keeping both sides can be as wrong as choosing one. If the additions represent different concerns, the correct fix may give them separate names. If they represent the same concern, a person may need to decide the policy.

## 5. Data flow: a changed value reaches another change

One pull request sets policy.maxRetries to zero. Another adds a retry loop bounded by policy.maxRetries. The loop can compile, yet never execute on the combined result. Following the value from its definition to its use explains why the changes matter to each other. A finding asks whether that behavior is intended; zero retries may be exactly what the team wants.

## 6. Confluence: independent edits meet at one result

A pricing pull request raises the base price while a separate fees pull request adds a service charge. Both feed the same order total. Each edit can be correct alone, while together they exceed the intended change. Confluence highlights that shared downstream result. The useful review question is about the combined total and the product requirement, not simply whether the two edits touch different files.

## 7. Override: a later write erases an earlier one

One pull request sets user.locale from a detected preference. Another adds an initialization path that writes user.locale = "en" before the value is used. The detector still runs, so a superficial review can miss that its result is overwritten. The resolution might reorder initialization, narrow the fallback condition or remove the redundant write. Intent determines which one is right.

## 8. Textual conflict: the same lines have different replacements

Two pull requests edit the same timeout setting, one to 30 and one to 45. Git reports a conflict because it cannot combine those replacements automatically. Merget tracks this alongside semantic conflicts so the queue can resolve the collision in context. Choosing the larger value is not automatically safer; the setting’s units, callers and purpose still matter.

## From a category to a merge decision

For each finding, first locate the two pull requests and the affected definitions or callers. Then identify the intended combined behavior. A rename should preserve the new feature using the new name. A policy change needs a conscious decision about the reader. A duplicate definition may call for consolidation or separate names. The category narrows the question, but the code and intent answer it.

Merget resolves supported conflict shapes directly and can use agent assistance for harder cases (see the [conflict resolution benchmark](https://merget.ai/benchmarks/conflict-resolution)). Queue order determines the result each later change must join. Once a fix is proposed, validate the combination: compile or build where useful, run tests that exercise both changes, and follow the repository’s configured review requirements. A resolved conflict alone does not establish that the feature is correct.

You can assess this workflow before allowing source-code changes. Start in Advisory mode, choose pull requests that reproduce one or two patterns from this list, and inspect the findings. Include independent changes too, so you can see whether the queue distinguishes work that needs coordination from work that can run alongside it. Coverage varies by language and build context; the best evidence is the behavior on code your team actually ships.

[See how Merget resolves conflicts in queue order](https://merget.ai/how-it-works), or [sign up free](https://sema.merget.ai/login) and connect one repository.

### How a semantic merge queue works

How a semantic merge queue follows code relationships across pull requests, resolves conflicts in queue order and checks the combined result before landing.

Merget team · Nov 13, 2026 · 5 min read

[Open](https://merget.ai/blog/what-makes-a-merge-queue-semantic)

### Why a clean merge can still break main

Two pull requests can pass alone and merge without text conflicts while breaking the combined build. Here is a small example and the workflow that catches it.

Merget team · Nov 13, 2026 · 5 min read

[Open](https://merget.ai/blog/why-a-clean-merge-can-still-break)

### Keep humans in control of automatic conflict resolution

Start in Advisory, inspect the evidence, then choose how far Merget can act. A practical guide to modes, merge requirements and a first repository.

Merget team · Nov 13, 2026 · 5 min read

[Open](https://merget.ai/blog/keeping-humans-in-the-merge)

[All posts](https://merget.ai/blog)
