Configuring comparisons

Choose your source and target metadata location and compare them for differences

Jason Mann avatar
Written by Jason Mann
Updated over a week ago

Gearset lets you compare two sets of metadata and see the configuration differences between them. This metadata can be a Salesforce org, a Salesforce DX scratch org, a source control repository, or a local folder on disk

To run a comparison, you'll first need to add some connections to your metadata:

Comparing two Salesforce orgs

  1. Make sure you're on the Compare and deploy page (under Metadata deployments) and have already added some org connections.

  2. Under Choose source metadata location, select Salesforce organization.

  3. Select one of your saved org connections from the dropdown in the username field.

  4. Repeat for Choose target metadata location.

  5. Click COMPARE NOW to begin the comparison using the default metadata filter.

Once you have selected an org, Gearset will begin querying Salesforce for the number of metadata components to retrieve in the comparison, based on your current metadata filter. This should complete after 5-10 seconds, but you don't have to wait for this to finish in order to begin your comparison. 

If numerous objects are detected, Gearset will suggest that you may want to reduce the metadata types included in your filter to speed up comparison time. You can do this via a custom metadata filter.

Comparing metadata in a source control repository

  1. Make sure you're on the Compare and deploy page and have already added a source control and an org connection.

  2. Under source or target metadata location, choose Source control.

  3. Select one of your connected source control providers from the drop-down.

  4. Select the repository you wish to connect to.

  5. Select the branch within the repository you wish to connect to.

  6. Choose if you want to filter the comparison results by a package file (if one exists).

  7. Select the other metadata location for your comparison (source or target), using either Source control or a connected Salesforce organization.

  8. Click COMPARE NOW to begin the comparison using the default metadata filter.

Comparing metadata from a folder on disk

If your metadata is stored locally on your computer, or on a source control system not accessible in the app (such as an on-premise solution with no external access), you can upload metadata from a local folder on your computer as the source of a comparison and deployment.

  1. Make sure you're logged into Gearset and on the Compare and deploy page (under Metadata deployments) and have already added some org connections.

  2. Under Choose source metadata location, select Local files.

  3. Click Upload folder, then select a folder on your computer that contains your metadata. (See how to structure your metadata.)

  4. Click UPLOAD to confirm the folder to use. Gearset will zip and upload the contents of your folder.

  5. Choose a target location for your metadata comparison.

  6. Click COMPARE NOW to begin the comparison using the default metadata filter.

Deploying metadata to a folder on disk is not currently supported on the hosted app. 

Configuring your metadata comparison filter

When running a comparison, by default Gearset compares the most common metadata types between your source and target. This includes Custom Objects, Profiles, Permissions and Apex code. This is called the Default comparison. If you want more control over what metadata is compared, you can create a custom metadata filter.

To learn more about custom metadata filters and how filtering works, see this support article.

Did this answer your question?