Start free
Andrew Hanna

Andrew Hanna

Source-Driven Development in Salesforce, Explained

Source-Driven Development in Salesforce, Explained

Source-driven development in Salesforce means your Git repository, not the org, is the single source of truth. Every change lives as a versioned file, every deployment traces back to a commit, and your pipeline rebuilds environments from that source instead of clicking metadata between orgs by hand. It is the model Salesforce DX was built around, and in 2026 it is the default assumption behind almost every serious release process.

What is source-driven development in Salesforce?

In the classic approach, the org is treated as the source of truth. You make changes in a sandbox, bundle them into a change set, and push them forward, hoping nothing drifts along the way. Source-driven development flips that. Your metadata lives as files in version control, and the org becomes a rendering of what the repository says it should be. As Salesforce's own DX guidance puts it, source tracking watches what you create, update, or delete so the repository and the org stay honest with each other.

The payoff is traceability. Every production change links back to a specific commit, code review happens before merge, and you get a full audit trail for free. That governance is not a nice-to-have in a regulated Salesforce org; it is the reason source-driven development won.

How is it different from the org development model?

Salesforce ships two development models, and the difference is really about source tracking:

  • Org development model: you work against orgs that do not track source, like production, Developer Edition orgs, or non-tracked sandboxes. You specify by hand what to retrieve and deploy.
  • Source-driven (package) model: you work against source-tracked orgs, mainly scratch orgs and source-tracked sandboxes. Salesforce DX tracks changes on both sides automatically, and sf project deploy start or sf project retrieve start move only what actually changed.

Most teams live somewhere between the two. That is fine. The direction of travel, though, is toward source tracking and away from manual change sets, which is the same shift we unpack in why every Salesforce DevOps tool ignores package development.

Why did source format change everything?

Source-driven development only works because of source format. The old metadata format packs a whole custom object, its fields, validation rules, and list views into one long XML file. Source format decomposes that into small, modular files, one per component, under a hierarchical folder structure. The result, as Gearset documents, is cleaner diffs and far fewer merge conflicts: two developers editing different fields on the same object no longer collide, because their changes live in separate files. Source format is now Salesforce's recommended default for new projects.

Where does source-driven development still hurt?

Here is the part most explainers skip. Source format does not decompose everything. Profiles, permission sets, sharing rules, workflows, and external services still land in large, shared files, so two people editing the same profile will still fight in version control. Source tracking also does not cover every metadata type; you have to check the Metadata Coverage Report to know what is actually tracked, and the gaps are where teams get burned.

Scratch orgs make this cleaner in theory, but real orgs carry years of configuration that never lived in Git. Getting to source-driven is a migration, not a switch you flip, and the cost of not making that move shows up every release, which is exactly the math we run in the true cost of manual Salesforce deployments. Tooling built to reconcile those messy edges, rather than assume a greenfield project, is what separates a working pipeline from a demo.

How do you actually adopt source-driven development?

  1. Get your metadata into Git in source format. Retrieve from your existing org, convert to source format, and commit. This is your new baseline.
  2. Pick a branching model that maps to your orgs, so every environment is buildable from a branch.
  3. Turn on source tracking where you can, using source-tracked sandboxes and scratch orgs for feature work.
  4. Automate deploys from commits, so nothing reaches production except through a reviewed, versioned change.
  5. Plan for the un-decomposed types up front, deciding how profiles and permission sets are owned before they cause conflicts.

A pipeline that treats Git as the source of truth, tracks changes accurately, and handles the metadata Salesforce does not fully decompose is precisely what Serpent is built to run. The open-source stack can get you there too, and we give it an honest read in our look at sfdx-hardis.

FAQ

Is source-driven development the same as Salesforce DX?

No. Salesforce DX is the tooling and format; source-driven development is the practice of making your Git repository, rather than the org, the source of truth.

Do I need scratch orgs for source-driven development?

No. Scratch orgs help, but source-tracked sandboxes also support source tracking, so you can adopt the model without a full scratch-org workflow.

Does source format eliminate merge conflicts?

It reduces them sharply by giving each component its own file, but profiles, permission sets, and a few other types still share large files and can conflict.

Can I mix source-driven development with change sets?

You can during a transition, but the goal is to retire manual change sets so every change is versioned, reviewed, and traceable to a commit.

Related Articles

Curious about faster shipping before you dive in? Let's talk

Commitment free!