Use Source Control

With Salesforce DX, you can change the way your team defines their source of truth. Instead of getting the latest version of code or metadata from an org, your team can use a centralized source control system, such as git and GitHub. This style of managing development artifacts (metadata) is called source-driven development. Shifting to source-driven development doesn't eliminate conflicts in code or metadata, or change the need to communicate clearly across teams. However, it does put the burden of organizing, managing, and resolving changes into a source-control system, which is built to do this job efficiently.

Source-driven development can also give you and your team greater visibility (and audit history) into the changes made to your org and better ways to undo changes that have a negative impact. Source-driven development in DX also helps your team to scale by enabling multiple developers to collaborate without stepping on each others' toes.

Work saved in your Code Builder environment is still there when you return, but Code Builder isn’t suited for permanent storage. A source control system is an ideal place to save your changes before you close the Code Builder tab.

Code Builder works seamlessly with Git repositories that are accessible through the public internet. It supports both public and private repositories as long as they can be reached using an unrestricted URL. As a result, developers have the flexibility to use a variety of source control setups.

However, there are a few things to keep in mind:

  • Code Builder doesn’t support repositories hosted on private networks or behind VPNs, such as those on GitHub Enterprise Server.
  • If your setup includes a proxy or private network, Code Builder is probably not compatible.
  • While Code Builder doesn’t natively support VPNs, an OpenVPN extension is available in the Open VSX Marketplace. This extension provides a potential workaround, but it hasn’t been officially tested or supported by Salesforce. Users can explore this option at their discretion.

For optimal performance, make sure your repositories are publicly accessible and free from network restrictions.

For more information on using source control with a DX project, see Salesforce DX Developer Guide: Project Setup.

Code Builder supports extensions from the Open VSX Marketplace, so you can customize and extend its functionality. Code Builder comes preinstalled with the Salesforce Extension Pack and Salesforce CLI. You can also install tools that align with your workflow, such as Bitbucket, Jira integrations, or third-party CLI tools available on npm. These tools help you be more productive and have a desktop-like experience in your browser. They also streamline your workflows and keep your version control practices efficient.