---
schema_version: "1"
id: 0d4bf5078e7f0b3c844035d4b22ba79a92c5af8d9e27f2eb3b8caa4878ce3e3f
title: Move Metadata Changes to and from a Scratch Org
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/api_meta/meta_use_cases_to_from_scratch_org.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_use_cases_to_from_scratch_org.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: c0d7355fbb857b9def7f904521a54c015f6ecc2a4ab02c5f9ead2d944af201de
description: Use a scratch org to develop and test changes to metadata. You can perform your development within or outside the scratch org using Salesforce CLI or Salesforce Extensions for VS Code, which leverage the power of Metadata API.
---
# Move Metadata Changes to and from a Scratch Org

Use a scratch org to develop and test changes to metadata. You can perform your development within or outside the scratch org using Salesforce CLI or Salesforce Extensions for VS Code, which leverage the power of Metadata API.

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.

#### See Also

- [Push Source to the Scratch Org](https://developer.salesforce.com/docs/atlas.en-us.264.0.sfdx_dev.meta/sfdx_dev/sfdx_dev_push_md_to_scratch_org.htm)
- [Pull Source from the Scratch Org to Your Project](https://developer.salesforce.com/docs/atlas.en-us.264.0.sfdx_dev.meta/sfdx_dev/sfdx_dev_pull_md_from_scratch_org.htm)