# See the original version in merge conflicts

> One line in Git config adds a third section to conflict markers so you can see what both sides started from.

Source: https://fullbytedeveloper.com/blog/zdiff3
Published here: 2026-11-11

The default conflict marker shows two versions: yours and theirs. You guess what they started from. One line in Git config adds the original, so you know what both sides changed.

## Set the conflict style

Run this once. It applies to every repo.

```bash
git config --global merge.conflictStyle zdiff3
```

## What you see in a conflict

A conflict in `server.js` now shows three sections:

```text
<<<<<<< HEAD
const port = 3000;
||||||| parent of abc1234
const port = 8080;
=======
const port = 8000;
>>>>>>> feature
```

The middle section (`|||||||`) is the original before either branch touched it. HEAD changed 8080 to 3000. Feature changed 8080 to 8000.

## Read it this way

- Top: your version (HEAD).
- Middle: what they both started from (the merge base).
- Bottom: the other branch.

Knowing the original tells you whether one side added lines, deleted lines, or both sides edited the same line differently.

## Why zdiff3 over diff3

Both styles show the original. `zdiff3` trims unchanged prefix and suffix lines so the original section is shorter in big conflicts. Same information, less scrolling.

Send this to the friend who stares at merge conflicts guessing what the original code was.

## Sources

1. [Git docs: git-merge](https://git-scm.com/docs/git-merge#_how_to_resolve_conflicts)
2. [Git docs: git-config (merge.conflictStyle)](https://git-scm.com/docs/git-config#Documentation/git-config.txt-mergeconflictStyle)
