Comparing Metadata

Firstly we are going to need a good diff tool. I used Sublimerge in SublimeText and it worked well. 

VS Code has it's own diff engine but you can also add extensions. Here's a good overview of doing file comparisons in VS Code https://www.meziantou.net/2018/03/19/comparing-files-using-visual-studio-code

However, with the new folder structure for DX we really need to compare folders, not files, since every single field is in a different file. Now, this seems more difficult. You can use your Git tools (like the GitLens extension) to compare files from one branch to another within the same Git repository, but I have two different Git repositories from two different orgs. I don't want to have to use an external tool like Winmerge. Oh I gave up trying to find a way to do this and downloaded DiffMerge - nope, that was HORRIBLE! Don't use it. 


Next you need the two orgs you are going to compare, with their downloaded metadata. 

You can open the two Orgs in two different instances of VS Code or you can create a Workspace. 

  • File Save Workspace As - name the new workspace
  • Click in a blank section below the folder tree then choose Add Folder to Workspace, and chose the folder containing the other org. 

It seems to still work with DX, but it could get very confusing. 


Now, there seems to be NO WAY to compare the folders for all the fields in the Account object for example, across two orgs, within VS Code. You have to use an external folder comparison diff tool. Soooooo annoying. So I ended up using IntelliJ because it was the least worse of the ones I had access to or that were free. Terrible. Surely there is a better way than this?