Compare & Promote Between Orgs
sfdt compare enumerates metadata members on both sides and reports what’s source-only,
target-only, or in both. Export the source-only set as a package.xml to promote it.
When the two orgs run different Salesforce releases (detected best-effort from each org’s REST
version list), sfdt compare prints a heads-up before comparing — metadata valid on one release
may not deploy cleanly to another. It’s non-fatal and skipped for org↔local comparisons or when a
release can’t be determined.
Audit what’s in production but not in source
sfdt compare --source local --target productionThen open sfdt ui → Compare and filter by target-only to see what exists in production
but isn’t in your repo (often manual changes that need to be reclaimed into source).
Promote sandbox changes to production
Compare and export the diff
sfdt compare --source staging --target production --output deploy/promote.xmlThis writes a package.xml of everything present in staging but missing from production.
Deploy the exported manifest
sf project deploy start --manifest deploy/promote.xml --target-org productionDrift vs Compare
Reach for compare when you care about the presence of members across orgs. Reach for drift when you care about content differences between local source and one org. See the Drift vs Compare table.