+ Start a Discussion
Parteek Goyal 3Parteek Goyal 3 

How to push source code to scratch orgs in salesforce dx

Hi All,

I need help in push source code to scratch orgs in salesforce dx.

Thanks,
Parteek
vijaya53645vijaya53645
Try  Below:
Sfdx force:source:push
Before Push your source code to scrach org.You should  to Authorize an Org

 Below link Helps You:
https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_push_md_to_scratch_org.htm

IF it helps you than please mark it as a solution 
 
Khan AnasKhan Anas (Salesforce Developers) 
Hi Prateek,

Greetings to you!

To push changed source to your default scratch org:
sfdx force:source:push

To push changed source to a scratch org that’s not the default, you can indicate it by its username or alias:
sfdx force:source:push --targetusername test-b4agup43oxmu@example.com
sfdx force:source:push -u test-b4agup43oxmu@example.com
sfdx force:source:push -u MyGroovyScratchOrg

Please refer to the below links which might help you further with the above requirement.

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

https://trailhead.salesforce.com/en/content/learn/projects/quick-start-salesforce-dx/create-and-test-our-scratch-org

https://developer.salesforce.com/docs/atlas.en-us.sfdx_cli_reference.meta/sfdx_cli_reference/cli_reference_force_source.htm

I hope it helps you.

Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.

Thanks and Regards,
Khan Anas