3

really need your help.
I have 2 sandboxes which have their own development, now that i want to merge them into one, i want to make a comparison of diff between those 2 orgs.

I have tried running this command
enter image description here
it can only works on a few components like class and lwc that i know of
but it would throw error if i run it on Object metadata
enter image description here



I have updated sfdx-cli to the latest version but it is still failing to get diff on Objects metadata and many other kind of metadata.

2 Answers 2

6

The UI command only works to diff the local repo to an org. To compare two orgs, retrieve both, then use a tool like diff or WinDiff to check the differences:

sfdx force:mdapi:retrieve -k manifest.xml -u sandbox1 -r sandbox1 -z
sfdx force:mdapi:retrieve -k manifest.xml -u sandbox2 -r sandbox2 -z

Where manifest.xml is a Package, -u is the username or alias for the org to retrieve, -r is the destination directory, and -z automatically decompresses the ZIP files. Other options are available, e.g. if you have built a Package or Change Set in the UI, you can use -p instead of -k.

And then compare the differences:

diff -r sandbox1 sandbox2
1
  • right, thanks for your advice... :thumbsup Commented Aug 9, 2022 at 7:37
1

You may also try sforgcompare to compare the orgs.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .