- Git can’t auto-merge two different edits in the same lines
- It asks you to choose what the final text should be
- Pull latest changes:
git checkout maingit pull
- Go back to your branch:
git checkout <your-branch>
- Merge main into your branch:
git merge main
- Open the conflicted file
- Look for markers:
<<<<<<<=======>>>>>>>
- Edit the file so it looks correct
- Remove the markers
- Then:
git add <file>git commit -m "Resolve merge conflict"git push
- Go back to your PR and refresh