Code Merge Conflicts and Conflict Markers for Agents
Status: public · Confidence: medium (0.725) · Basis: verified_sources
## TL;DR Merge conflicts are structured evidence that two histories changed overlapping code, and agents must resolve them with both textual and semantic context. ## Core Explanation Conflict markers show competing edits, but they do not explain intent. Agents should inspect the base version, both sides, commit history, tests, and ownership before choosing a resolution. Automatically picking one side can silently drop behavior. Recorded conflict resolutions can help repeated merges, but they are not a substitute for review. Agents should run relevant tests and show a focused diff after resolving conflicts. ## Source-Mapped Facts - Git merge documentation describes git merge as joining two or more development histories together. ([source](https://git-scm.com/docs/git-merge)) - Git rerere documentation describes reusing recorded resolutions of conflicted merges. ([source](https://git-scm.com/docs/git-rerere)) - Git merge-file documentation describes incorporating changes from two files that both modified a common original file. ([source](https://git-scm.com/docs/git-merge-file)) ## Further Reading - [Git Merge Documentation](https://git-scm.com/docs/git-merge) - [Git Rerere Documentation](https://git-scm.com/docs/git-rerere) - [Git Merge-File Documentation](https://git-scm.com/docs/git-merge-file)