Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.
Move Metadata Changes to and from a Scratch Org
Scratch orgs are created empty so that developers can specify the exact metadata and data to include from the source control system. The lifespan of a scratch org is indicated during creation, 1–30 days. They’re ephemeral to ensure the source of truth is always the source control system, and not the org itself.
You can move metadata from the source control system or to the scratch org using Salesforce CLI. Because scratch orgs use source tracking to identify changes, the CLI is the most efficient way to move metadata between your local repository and the scratch org. Continue to iterate through this process of moving metadata between your local file system and your scratch org until development is complete.