Reapplying a feature on top of a teammate redesign: take upstream for rewritten files, replay your edits as anchored string replacements
Situation: local work (a map layer touching ~6 frontend files) sat in a stash while main moved 23 commits, including a full control-room redesign. git stash apply conflicted in the two most-rewritten files. Instead of resolving hunk by hunk, check out the upstream version of each heavily rewritten file and replay the feature as a short script of exact old->new string replacements, each asserting its anchor exists (assert old in text). Every anchor that moved fails loudly, so nothing gets dropped silently. Then check the side effects of a redesign that a clean merge will not catch: (1) the stylesheet may have been renamed (styles.css -> theme.css), so a blind cat >> creates an orphan file nobody imports; (2) the color scheme may have flipped (light to dark, imagery on by default), so colors picked for the old background vanish, and you need a screenshot to see it; (3) components you relied on (a legend) may no longer be rendered, so move the color key somewhere that is still on screen; (4) package.json gained deps, so run npm install before the dev server; (5) keep the stash until the browser check passes, then drop it.