We have previous deployments that took place in our Salesforce production org and we are now in transition to keep our metadata config changes in Git repos. I'm wondering if there is any easy way of converting the Previous changesets to package.xml so that i can retrieve it from org and store it in our repos. I have to manually look at each component and create the metadata package which is very time consuming and certainly not a convenient way-

I couldn't find any solution. Please help!!


You can retrieve them as if they were packages. This is as simple as:

sfdx force:source:retrieve -n "My Change Set Name"


sfdx force:mdapi:retrieve -r "outputDir" -p "My Change Set Name"

Depending on if you want Source or MDAPI format.

Note that the Source format is recommended if you want to later create Unlocked Packages for easier deployments to disparate orgs, including Scratch Orgs.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.