function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Greg FinzerGreg Finzer 

Merging from Scratch Org to Org

There is a command in VS Code called SFDX: Push Source to Default Scratch Org.

What is the command to merge the code from the Scratch Org to the Real Org using VS Code or the SFDX cli?

Or is there some way you do it in Salesforce UI?
Best Answer chosen by Greg Finzer
Raj VakatiRaj Vakati
You mean push to sandbox .. 


You need to use this command
 
sfdx force:mdapi:deploy -d mdapi_output_dir/ -u "sandbox_username" -l RunSpecifiedTests -r test1,test2,test3,test4

https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_build_mdapi_deploy.htm

All Answers

Raj VakatiRaj Vakati
You mean push to sandbox .. 


You need to use this command
 
sfdx force:mdapi:deploy -d mdapi_output_dir/ -u "sandbox_username" -l RunSpecifiedTests -r test1,test2,test3,test4

https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_build_mdapi_deploy.htm
This was selected as the best answer
Greg FinzerGreg Finzer
I am in a Trailhead Org.  I created a Scratch Environment using VS Code.  So I have to create a Sandbox first then deploy to it and then somehow get it to the Org?
Raj VakatiRaj Vakati
You can create sandbox only if you have production . you can able to push into another Developer Org also and push there 
 
sfdx force:mdapi:deploy -d mdapi_output_dir/ -u "target_username" -l RunSpecifiedTests -r test1,test2,test3,test4

 
Greg FinzerGreg Finzer
Thanks Raj!