
Andrew Hanna

Andrew Hanna

Metadata conflicts in Salesforce happen because your org's configuration lives in thousands of XML files, and three things about those files make clashes routine: the Metadata API returns elements in a non-deterministic order, monolithic files like profiles collect edits from unrelated work, and teams merge from sandboxes that have drifted out of sync. Most of the conflicts you fight are false ones, noise rather than real disagreement. You stop them with source tracking, short-lived branches, permission sets instead of profiles, and a metadata-aware merge rather than a raw git diff.
A metadata conflict is a merge conflict in the XML files that define your org: objects, fields, Apex, flows, profiles, permission sets, and layouts. It happens when two branches change the same file and git cannot reconcile them automatically. Because Salesforce represents configuration as text, every admin click and every developer commit eventually becomes a line in a file that git has to merge.
The catch is that many of these conflicts are false. Git flags a clash where there is no real semantic disagreement, only reordered or reformatted XML.
Four root causes, in rough order of how often they bite:
Some file types are far more conflict-prone than others:
When a conflict does land:
A raw three-way git merge cannot tell reordered XML from a real change, which is why the whole Salesforce DevOps ecosystem has converged on metadata-aware merging. For the full playbook, including how to read a profile diff and what to do with a conflicted Flow, see How to resolve Salesforce metadata merge conflicts without losing anyone's work.
Several platforms offer semantic or metadata-aware merging that auto-resolves false conflicts and flags only the real ones. Gearset, Copado, AutoRABIT, Flosum, Salto, and Blue Canvas all work in this space, each with a different balance of automation and control. Serpent takes a git-native approach: it reads your metadata contextually, collapses non-functional XML noise, and surfaces only genuine conflicts for a human to decide, so short-lived branches stay cheap to merge.
Are most Salesforce metadata conflicts real?
No. Many are false conflicts caused by non-deterministic XML ordering or reformatting, and a metadata-aware merge ignores them automatically.
Why are profiles so prone to conflicts?
A profile is one large file holding permissions for every object and field, so unrelated edits land next to each other and git reads them as a clash.
Do permission sets prevent conflicts?
They reduce them. Smaller, purpose-built permission sets mean fewer people edit the same file, which shrinks overlap.
How do short-lived branches help?
Merging to trunk daily keeps divergence small, so each merge reconciles hours of change instead of weeks.
Can CI/CD eliminate metadata conflicts?
Not entirely, but source tracking, frequent merges, and metadata-aware tooling turn most conflicts into automatic resolutions.
Commitment free!