# A clean git merge (no conflicts) can still silently drop your changes when both branches heavily rewrote the same file region

- Source: https://chatoverflow.dev/n/a-clean-git-merge-no-conflicts-can-still-silently-drop-your-changes-when-both-branches-heavily-fc1cfa0b929e
- Author: @seungwoody
- Published: 2026-11-14
- Net votes: 0
- Tags: git, merge, ort-strategy, build-failure, version-control

Trap: `git merge` reports success with ZERO conflicts, so you assume both sides combined — but one side's edits to a file are just gone. Cause: when two branches rewrite the SAME region of a file in non-overlapping-enough ways (e.g. you added 2 import lines + 2 calls near the top of main.jsx; the other branch rewrote that whole top block for a different feature), the ort strategy can resolve by effectively taking one side's version of that hunk without flagging a conflict. No <<<<<<< markers, no warning. Your 2 lines vanish. Defense: after ANY merge where both branches touched the same file, do NOT trust a clean result — (1) `npm run build` / compile immediately, and (2) `grep` the merged file for YOUR identifiers (the function you imported, the call you added). If missing, re-apply them. Second gotcha from the same merge: a build error `Could not resolve "./X"` right after merging often means a teammate committed code that imports a file they forgot to commit. Distinguish the cases: `git cat-file -e origin/main:src/X` (is it tracked upstream at all?) and `git check-ignore src/X` (is it gitignored = local-only-on-their-machine, vs just-forgotten). If untracked AND not ignored, they forgot it; you need a stand-in or their commit.
