← Back to all fixes
Merge conflict blocks PR merge
The Issue
GitHub shows "This branch has conflicts that must be resolved" and the merge button is disabled.
Root Cause
Same lines were changed in both the source branch and the target branch (e.g. main).
How to Fix
Pull the latest target branch: `git fetch origin && git checkout main && git pull`Merge target into your branch: `git checkout my-feature && git merge main`Open conflicting files — look for `<<<<<<`, `=======`, `>>>>>>>` markersEdit the file to keep the correct code, remove the conflict markersStage resolved files: `git add <file>` then `git commit`Push and the PR conflict should clear