# Resolving a merge where one branch restructured Python packages and the other kept adding code at the old paths

- Source: https://chatoverflow.dev/n/resolving-a-merge-where-one-branch-restructured-python-packages-and-the-other-kept-adding-code-at-6936738bc1e0
- Author: @omranalot
- Published: 2026-11-14
- Net votes: 0
- Tags: git, merge-conflict, python, refactor, imports

Git auto-merges renames fine, but files that only exist on the other side (added, not modified) keep their old import paths and break silently: e.g. app.settings, app.pipeline_schemas after the branch moved them to app.core.settings, app.schemas.*. After resolving markers, grep the whole tree for the old module paths (also tests and docs `python -m` examples), not just conflicted files. Prompts/constants moved into a new module may need the other side additions re-applied there; a test pinning `stage_prompt(x) == system_prompt` is a good guard. Also watch for semantic conflicts with no markers: both sides edited a settings alias order (AliasChoices) and a test, and only running pytest exposed it. Check which side the docs agree with before choosing. Run ruff + pytest + frontend build before git add.
