Explain git merge conflict code

Paste a file with <<<<<<<, ======= and >>>>>>> lines in it and Vibe explains which version came from which branch, what git already merged on its own, and what the fixed code should keep.

shipping.js

Up to 1,500 characters (about 60 lines). Your code is sent to Unvibe and Anthropic to write the explanation. Don't paste keys or passwords. Common key formats are refused.

Vibe15 lines selected

Press Explain it for the sample, or paste your own code first.

What this git merge conflict sample shows

conflict markers
<<<<<<< HEAD starts your side, from the branch you're on (main here), ======= divides the 2 sides, and >>>>>>> free-for-members ends the side from the branch being merged in. git stopped with CONFLICT (content): Merge conflict in src/shipping.js and exit code 1, and git status listed the file under both modified.
what merged by itself
Only the line both branches changed is marked. main's new fee, return 5.99, and the branch's delivery change, ? 3 : 5, each touched a line the other branch left alone, so git merged them in without asking. Run as it is, the file fails: Node.js stopped at line 3 with SyntaxError: Unexpected token '<<'.
--ours and --theirs
git checkout --ours and --theirs take one side's whole file, not just the marked line. --theirs brought back the branch's return 4.99 and undid main's fee change, and --ours kept 7 delivery days and undid the branch's 5. During a rebase the names swap: --ours gave main's line and --theirs the line from the commit being replayed.
resolving and committing
The fix keeps both changes: if (order.total >= 75 || order.member). With the markers gone, git diff --check printed nothing, git add marked the file resolved (All conflicts fixed but you are still merging.) and git commit --no-edit made the merge commit. The fixed file returned 5.99 for a 60 order, 0 for a member's 60 order and 0 for an 80 order.

Good to know

  • Run with git 2.55.0 and Node.js 25.7.0 in a test repo with 2 branches. git merge --abort put main back as it was, with nothing in git status --short.
  • With merge.conflictStyle=zdiff3, git adds a third part between ||||||| and =======: the line as it was before either branch changed it, if (order.total >= 50) {. That shows what each side changed, not just where they ended up.

Watch out: git doesn't stop you from committing the markers. git add on the file with <<<<<<< still in it marked the conflict resolved, and git commit made the merge with exit code 0. git diff --check HEAD~1 HEAD on that merge caught it: it printed leftover conflict marker for lines 3, 5 and 7 and exited with code 2. Search the file for <<<<<<< before you add it.

Explain git merge conflict code beside your editor

Unvibe is a free app for Mac and Windows. In the app there is no pasting: select code in any app and press Control+U (Ctrl+Alt+U on Windows).

Install on Mac

curl -fsSL https://unvibe.site/install.sh | bash

Paste into Terminal. Unvibe isn't notarized by Apple yet, so this is the smooth path.

No install warning? Use Unvibe in your browser

Opening the .dmg the first time
  1. Open the .dmg and drag Unvibe to Applications.
  2. Open it once; macOS says it can't verify it. Click Done.
    macOS dialog: Unvibe Not Opened, with Done and Move to Trash
    Real screen, macOS 15
  3. System Settings › Privacy & Security › Open Anyway. Confirm, then enter your Mac password. The button shows for about an hour after you try to open Unvibe.
    macOS Privacy & Security, Security section: Unvibe was blocked to protect your Mac, with the Open Anyway button
    Real screen, macOS 15

The Terminal line checks the download against the published SHA-256 and Unvibe's self-signed signature before it installs anything. More help with the first open