consolelog.tools

Merge Conflict Resolver

Visual helper for resolving git merge conflicts

About this ToolHow it works, benefits & use cases

Paste a file that Git left full of conflict markers and this resolver untangles it into something you can actually read. It scans for the <<<<<<< HEAD, =======, and >>>>>>> markers — and the ||||||| base section from diff3-style conflicts — and breaks the file into discrete conflict blocks, each shown side by side as Current (HEAD) versus Incoming (Branch), with the common-ancestor Base displayed when present. An analysis panel counts the total conflicts, total lines, conflict lines, and untouched normal lines. Choose a resolution strategy — accept Current, accept Incoming, keep Both (current first, then incoming), or take the Base version — and the tool reassembles the whole file with every conflict resolved that way, preserving the non-conflicting lines in place. The clean result is ready to copy or download. Everything is parsed in your browser, so the code you paste never leaves your machine.

How to Use

  1. 1Paste the full contents of your conflicted file — markers and all — into the input panel, or click Load Example.
  2. 2Press Parse Conflicts to split the file into numbered conflict blocks and see the Current / Incoming (and Base) sides.
  3. 3Review the Conflict Analysis panel for the count of conflicts, conflict lines, and normal lines.
  4. 4Pick a Resolution Strategy: Current (HEAD), Incoming (branch), Both, or Base.
  5. 5Press Resolve All Conflicts and copy or download the reassembled, marker-free file.

Key Benefits

  • Splits a marker-laden file into clear, numbered conflict blocks
  • Side-by-side Current (HEAD) vs Incoming (Branch) view, plus Base for diff3 conflicts
  • Analysis panel counting total conflicts, conflict lines, and normal lines
  • One-click strategies: accept Current, Incoming, Both, or the Base version
  • Rebuilds the entire file with non-conflicting lines kept exactly in place
  • Shows each block’s line range so you can locate it in the original file
  • Parses locally in your browser — pasted code is never uploaded

Common Use Cases

  • Understanding a messy merge conflict before resolving it by hand in your editor
  • Quickly accepting all of one side (yours or theirs) across an entire file
  • Reviewing what HEAD and an incoming branch each contributed at a conflict
  • Inspecting the common-ancestor Base from a diff3-style conflict to decide a resolution
  • Teaching how Git conflict markers are structured and how strategies differ

Paste the file content containing conflict markers (<<<<<<< HEAD, =======, >>>>>>>)

The file after applying the selected resolution strategy

Resolve conflicts above to see the output.

Understanding Merge Conflicts

Merge conflicts occur when Git cannot automatically resolve differences between two commits. Conflict markers look like this:

<<<<<<< HEAD
Your changes
=======
Their changes
>>>>>>> branch-name
  • <<<<<<< HEAD — Start of your changes
  • ======= — Separator between changes
  • >>>>>>> branch — End of incoming changes

Was this tool helpful?

Share Your Experience

Help others discover this tool!

Related tools