Salesforce Trunk-based Development Upd Jun 2026
| Strategy | When to Use on Salesforce | |----------|----------------------------| | (commit directly to main ) | Small teams (<5 devs), high trust, simple metadata (no profiles). | | Short-lived branches + PRs | Most Salesforce teams. 24-hour max lifetime. | | Release branches (only as needed) | Regulated industries. Create release/v1.2 from main , patch separately. |
Trunk-Based Development is a source control strategy where developers merge all changes directly into a single shared branch (the "trunk" or main ) multiple times a day. Instead of long-lived feature branches, teams use (lasting less than a day) or commit directly to the trunk. salesforce trunk-based development
Problem: Multiple developers editing the same profile.xml cause merge conflicts. Solution: | Strategy | When to Use on Salesforce