---
schema_version: "1"
id: 14e42a3be29a8a5c5a3fbfc86b4b63c9143780fcaecddfecd483fbcf820f1eb1
title: Deploy and Retrieve Code
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/salesforcedx/sfvscode/guides/deploy-retrieve/deploy-changes.md
canonical_url: https://developer.salesforce.com/docs/platform/sfvscode-extensions/guide/deploy-changes.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 56c690ba1967bdf58a61402282282787018010c72e615ac1b1dbd63701c92b0a
products:
  - Salesforce Extensions for Visual Studio Code
  - salesforcedx
---
# Deploy and Retrieve Code

Retrieve and deploy org metadata by using the Command Palette or the Org Browser.

Say you want to change an existing Apex class or add a custom object to your production org. You first make and test these changes in a scratch org, check for conflicts, and then deploy the changes to another org for your team to access them. This ability to move changes between different Salesforce development environments, such as scratch orgs and sandboxes, for various stages of testing before production, is key to Salesforce development.

We support different deployment options based on your role and needs as a customer, system integrator, or independent software vendor (ISV) partner. For more information on deployment options, see [Build and Release Your App](https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_build_and_release_your_app.htm) in the _Salesforce DX Developer Guide_.

After testing your code, retrieve it to your local Salesforce project so that you can keep a single source of truth in source control.

With conflict detection turned on, you don't have to worry about accidentally overwriting changes from other developers in the org. Track changes by easily viewing changes between your local files and your default org at any time.

