DevOps, Source Control & Release Governance
Salesforce source tracking is not version control
A change list is not a history
An admin changes a Flow in a sandbox, a developer edits the same component locally and Salesforce CLI reports a conflict. The team resolves it by retrieving the sandbox version, then discovers that the retrieval replaced a tested branch change. Source tracking did its job: it identified that both sides changed. The delivery process failed because nobody had defined which version represented approved intent.
The JSBC Labs position is that Salesforce source tracking is a synchronisation aid—not version control. It can show changed metadata and help move it between an org and a local project. It cannot explain why a change exists, preserve review discussion, associate components with a business decision or reconstruct the exact release that should be restored after an incident. Those are source-control and release-governance responsibilities.
Know what source tracking actually records
Salesforce documents source tracking as a way to identify created, updated and deleted components between a local Salesforce DX project and a supported scratch org or sandbox. Preview commands can show what a deployment or retrieval would change, including potential conflicts and ignored files. This is valuable developer feedback because it reduces manual bookkeeping during iterative low-code and pro-code work.
The mechanism is local to Salesforce CLI configuration and has no direct effect on the org. Support also varies by environment: scratch orgs support it, selected Developer and Developer Pro sandboxes can support it, while production, Full and Partial Copy sandboxes do not. A process that depends on source tracking everywhere therefore breaks precisely where production assurance matters most.
Make Git the historical truth
Salesforce's own DevOps Center guidance describes source control as the single source of truth and uses it to retain who changed what, why it changed, previous versions and recovery points. The repository should contain the approved Salesforce DX project, manifests, package definitions, environment configuration templates, test assets and deployment automation required to reproduce a release.
Every org-originated change must complete the journey: retrieve it, inspect the diff, remove accidental metadata noise, commit it to a branch and review it before promotion. Do not treat a sandbox as the master copy because it happens to contain the newest edit. Sandboxes are mutable execution environments. A commit is a durable, reviewable statement of intent that can be compared, tagged, rebuilt and reverted.
Track the gaps as deliberately as the changes
Not every metadata type has identical support across Metadata API, source tracking, packaging and other deployment mechanisms. Salesforce publishes a Metadata Coverage Report for this reason. Teams should maintain an inventory of components that are fully source-driven, components requiring specialised retrieval or deployment and configuration or data that must be managed through another controlled path.
Review .forceignore rules, manifests and package directories as governance artefacts. A file excluded from deployment may be intentional local noise—or an essential component silently missing from release scope. Likewise, a successful retrieval is not proof that the repository represents the complete org. Automate coverage checks where possible and make unsupported or manual elements visible in every release plan rather than burying them in tribal knowledge.
Conflict detection is not conflict resolution
Salesforce CLI can identify potential conflicts in source-tracked environments, but the documented resolution choices are fundamentally human: reconcile the changes manually or overwrite one side when certain it is correct. A timestamp cannot decide whether the sandbox edit implements a newer requirement, removes a security control or accidentally reverses another team's work.
Resolve conflicts at the semantic level. Compare the business behaviour, component dependencies and tests—not only XML lines. For Flows, permission sets, profiles and Lightning pages, visually small diffs can change access or runtime paths. Bring both authors into the decision when intent is unclear, record the resolution in the pull request and rerun validation. Never make force-overwrite the normal path through a shared environment.
Treat drift as an operating condition
Drift appears when administrators make emergency production changes, deployments omit dependencies, managed packages alter metadata or teams share sandboxes without disciplined promotion. Because production does not support source tracking, detecting that drift requires deliberate comparison and retrieval practices. Schedule read-only checks against an approved baseline, classify differences and assign an owner before they become the starting point for the next release.
Do not automatically commit every production difference back to the repository. Some differences are legitimate emergency fixes that need formalisation; others are unauthorised changes that should be removed. The repository remains authoritative only when exceptions follow a controlled reconciliation process. Capture the incident, retrieve the exact components, review their consequences, add tests and then decide whether to preserve or reverse the change.
Build a pipeline around an immutable commit
A reliable pipeline starts from a reviewed commit, not from the current contents of a developer sandbox. Create or refresh a clean validation environment, deploy the declared scope, install dependencies, load representative test data and run automated checks. Salesforce provides deployment preview to expose scope and ignored files, and deployment validation to execute production-oriented checks without immediately changing production.
Promote the same commit and manifest that passed validation. Salesforce notes that validate and quick-deploy operations do not use source tracking and overwrite corresponding metadata rather than merging it. That reinforces the need for a trustworthy input set. Record the commit SHA, deployment job, test results, approver and post-deployment actions so the release can be explained and reconstructed without inspecting whichever org happens to be available.
Measure control, not tool activity
Do not report DevOps maturity as the number of tracked changes, retrieved components or completed deployments. Measure uncommitted org changes, time to reconcile drift, pull-request review coverage, validation success, escaped defects, rollback rehearsal and the percentage of release scope reproducible from source. These measures expose whether the organisation can safely explain and recover its platform.
Source tracking is still worth using: it shortens the feedback loop and helps teams see differences before they overwrite work. But its value increases when bounded by a stronger operating model. Let source tracking answer what changed between two working locations. Let version control preserve approved intent. Let the pipeline prove that intent can become a safe release, and let production evidence confirm that the expected system actually arrived.
Official references
- Salesforce Developers — Track Changes Between Your Project and Org
- Salesforce Developers — Manage Source Tracking for Your Org
- Salesforce Developers — Source Tracking Best Practices
- Salesforce CLI Reference — project deploy preview
- Salesforce CLI Reference — project deploy validate
- Salesforce Developers — Metadata Coverage Report
- Salesforce Help — Source Control in DevOps Center
- Salesforce Architects — DevOps Patterns