Pull latest origin/main into the current local branch and resolve merge conflicts (aka update-branch). Use when Codex needs to sync a feature branch with origin, perform a merge-based update (not rebase), and guide conflict resolution best practices.
git config rerere.enabled truegit config rerere.autoupdate trueorigin remote exists.git fetch origingit pull --ff-only origin $(git branch --show-current)origin/main.git -c merge.conflictstyle=zdiff3 merge origin/main for clearer
conflict context.git add <files>git commit (or if the merge is paused)git merge --continueAGENTS.md).git status to list conflicted files.git diff or git diff --merge to see conflict hunks.git diff :1:path/to/file :2:path/to/file and
git diff :1:path/to/file :3:path/to/file to compare base vs ours/theirs
for a file-level view of intent.merge.conflictstyle=zdiff3, conflict markers include:
<<<<<<< ours, ||||||| base, ======= split, >>>>>>> theirs.ours/theirs only when you are certain one side should win entirely.git diff --checkDo not ask for input unless there is no safe, reversible alternative. Prefer making a best-effort decision, documenting the rationale, and proceeding.
Ask the user only when:
Otherwise, proceed with the merge, explain the decision briefly in notes, and leave a clear, reviewable commit history.