Do these 3 things before closing this tab:
1Fix the driver behind crashes, sound loss and screen glitches2Clear out junk files and repair common Windows errors3Scan for outdated or missing drivers - takes under a minuteA diff3 conflict shows the two competing versions of a disputed section plus the common-base text they both started from. Compare each side with that base, decide which behavior the file should have, then remove the marker lines and validate the result.
What each diff3 marker means
A typical Git conflict in diff3 style looks like this:
As an Amazon Associate I earn from qualifying purchases.
<<<<<<< ours
current-side text
||||||| base
text from the common ancestor
=======
other-side text
>>>>>>> theirs
<<<<<<<starts the current-side section. Its label may vary with the operation or context.|||||||begins the base section: the shared earlier text before the two versions diverged.=======separates the base from the other side’s version.>>>>>>>ends the conflict and usually labels the other side.
In Git’s example, the base appears between the current side and the other side. The key is to compare each proposed version with the base, rather than treating the marker labels as instructions about which version is correct. See Pro Git’s Advanced Merging guide and the Git merge documentation.
How to decide what the resolved file should contain
- Read the surrounding file. Establish what the disputed text is for before choosing between edits.
- Use the base as a reference point. It shows what existed before either side’s change; it is evidence of history, not automatically the right answer.
- Compare the current side with the base. Identify what changed and what effect that change is meant to have.
- Compare the other side with the base. Assess its intent and effect in the same way.
- Choose a resolution based on intended behavior. Keep one side if that is the intended change, combine edits if they can coexist, or write a new version that preserves what the file needs to do. Copying both sides unchanged is unsafe when they conflict.
- Remove the annotations and rejected alternatives. The saved file should contain the resolved content, not the conflict markers.
- Check the result in context and validate it. Run the project’s relevant checks before completing the merge or rebase.
This reflects the three-way model described in the GNU diff3 merging manual: two changed versions are considered against a common preceding version. The markers expose the competing text; they do not determine which resolution is correct.
#1 Best Overall
Show the base with diff3, or use zdiff3
Git’s merge.conflictstyle setting controls how conflict regions are presented. The styles differ in whether the base is shown and how much unchanged context remains inside the region:
| Style | Base visible? | Context in the conflict region |
|---|---|---|
merge |
No | Does not show the common-base text. |
diff3 |
Yes | Shows the base text between the two sides. |
zdiff3 |
Yes | Shows the base while trimming common lines from the conflict region. |
The Linux Kernel’s backporting documentation lists merge, diff3, and zdiff3 as conflict styles and recommends diff3 for making a patch’s before-and-after changes clearer. Git 2.35 introduced zdiff3; it is a more compact presentation, not a different rule for resolving conflicts.
Rank #2
Set or display diff3 conflict style
To make diff3 the default for your Git configuration, run:
git config merge.conflictstyle diff3
To set the preference globally for your user account, run:
git config --global merge.conflictstyle diff3
Pro Git also documents re-checking out a conflicted file in diff3 style:
git checkout --conflict=diff3 <path>
Check the command syntax against the Git version and workflow you use, particularly if your team standardizes how conflicts are shown during merge or rebase.
Quick Recap
Rank #4
- Used Book in Good Condition
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




