All Collections
Help Articles
Metadata Deployment
Exclusion files from Deployment or Commit
Exclusion files from Deployment or Commit

How to exclude files from a deployment or commit.

T
Written by Tam Tran
Updated over a week ago

You can exclude files or directories from your deployments by selecting "Deploy Options" tab, expand the "advanced options" and enter the list of files to be excluded from the deployments as per the screenshot below.

Exclusion.png

During the deployment process, after the package is retrieved from the source Org, Copado Essentials will remove all the files in the exclusion list before deploying the package to the target Org (or committing the package to the target Git repository). The format of the exclusion paths should be specified as below.

  • When deploying from Salesforce to Salesforce
    Since the package retrieved from the source Salesforce Org is in Metadata API format, the paths specified in the Exclusion list must follow Metadata API format (e.g. /objects/Account.object)

  • When committing from Salesforce to GIT
    Similar to the above, since the source is a Salesforce Org, the paths must follow Metadata API format (e.g. /objects/Account.object).

  • When deploying from Git to Salesforce
    The exclusion paths must follow the format of the source structure stored in Git.

    For example, if the source format is DX, use DX exclusion paths
    (e.g. /force-app/main/default/objects/Case/fields/Case_Vehicle__c.field-meta.xml).

    If the source format is Metadata API, use Metadata API exclusion paths (e.g. /objects/Account.object)

Did this answer your question?