Newer Version Available

This content describes an older version of this product. View Latest

Move Metadata Changes to and from a Scratch Org

You can use a scratch org along with your local file system to develop and test changes to metadata. To move the changes you make locally to and from the scratch org, use Metadata API.

Scratch orgs are disposable environments loaded with Salesforce code and metadata and last 10 days. These environments allow you to develop on Salesforce independent of your production environment. Developers often use scratch orgs in conjunction with their local environments to build customizations.

After you create a scratch org, move metadata from the production org with an initial push call. Then, move metadata from the scratch org to your file system for local development with a source pull. Move local changes back to the scratch org for testing using source push calls. Continue to iterate through this process of moving metadata between your local file system and your scratch org until development is complete.