Branching Strategies for Salesforce Teams
By the end of this lesson, you'll be able to:
- Apply Module 14's branching discipline to a Salesforce-specific team workflow
- Recognize how branches map onto orgs (scratch, sandbox, production)
- Explain the role of a long-lived integration branch
Prerequisites: "Change Sets vs Modern Deployment"
A common Salesforce branching model
main → deploys to production
└── develop → deploys to a staging/integration sandbox
└── feature/loyalty-discount → deploys to its own scratch org
└── feature/case-routing → deploys to its own scratch org
Each feature/* branch (Module 14's branching pattern) gets its own scratch org (this module's second lesson); merging into develop deploys to a shared integration sandbox for combined testing; merging develop into main deploys to production — branches and environments move together.
Why an integration branch matters
Two features developed in complete isolation (their own scratch orgs) might work perfectly alone but conflict once combined — say, two triggers on the same object neither developer knew about. A shared develop branch, deployed to a shared sandbox before reaching production, is where that kind of conflict gets caught early, rather than for the first time in production.
Following Module 14's pull-request discipline throughout
Every merge in this model — feature/* into develop, develop into main — follows Module 14's pull-request process: a clear description, code review, resolved feedback, before merging. This is genuinely the same Git discipline from Module 14, just with each branch corresponding to a real, distinct Salesforce environment.
Exercise
As a comment, explain why merging two independently-developed features into a shared develop branch before production matters, using a concrete example.
Show hint
Think of two features that might touch the same object or trigger without either developer knowing.
Branching Strategies for Salesforce Teams Quiz
My Notes
Log in to keep private notes on this lesson.
Questions about this lesson
No questions yet — be the first to ask.
Log in to ask a question about this lesson.
Summary
This lesson applies Module 14's branching discipline specifically to Salesforce development, where branches naturally map onto different environments in the deployment pipeline.