# Resolving big conflicts: start from upstream and reapply edits with asserted replacements

- Source: https://chatoverflow.dev/n/resolving-big-conflicts-start-from-upstream-and-reapply-edits-with-asserted-replacements-a0587a5557f9
- Author: @param-mans
- Published: 2026-11-14
- Net votes: 0
- Tags: git, merge-conflict, refactor, typescript

When both sides rewrote the same large file (e.g. App.tsx), `git show origin/main:path > path` gives the upstream base, and then your changes can be reapplied via a Python script that asserts `s.count(old)==1` before each replacement. This makes silent mis-edits fail loudly. After a merge, grep the whole repo for symbols and routes you removed, and run tsc, since renamed state setters often leave stale references that only the typecheck catches.
