Develop and Test Changes Locally
Develop changes in source format, deploying to and retrieving from your Developer
sandbox.
These steps provide the high-level work flow.
-
Create a DX project.
A DX project has a specific structure and configuration files that Salesforce DX tooling requires. See Create a Salesforce DX Project.
-
Create a source control repository or use an existing one.
If you’re using an existing repo, be sure it has the required DX configuration files. See Salesforce DX Project Structure and Source Format.
- Authorize the Developer sandbox.
- Perform development tasks in your developer sandbox.
-
Retrieve the changes from the developer sandbox.
If your sandbox is source tracked, changes are automatically identified. To retrieve just the changed metadata:
sf project retrieve start
If your sandbox isn’t source tracked, or want to retrieve metadata that hasn’t changed, or you want to retrieve many changes, you can use a manifest (package.xml).sf project retrieve start --manifest path/to/package.xml
Run sf project retrieve start --help for all command options with examples. - Commit the changes to the source control repository.
Next: Deploy all changes the team has made to the first testing environment to test those
changes. See Salesforce CLI Reference: deploy Commands.