Salesforce has defined different project structures for regular Salesforce projects and SFDX projects. The two formats supported by Gearset are the

  • Metadata API format, and the
  • Salesforce DX format

Deciding to use the SFDX project structure should be based on whether you want the additional features that SFDX projects provide, not whether you intend to work with SFDX scratch orgs: Gearset can deploy to and from any combination of regular Salesforce project, SFDX project, Salesforce org and scratch org.

If you deploy metadata into source control using Gearset, the project structure will match the regular Salesforce project.

If you want to to store your metadata using the SFDX project structure instead then you can either use the Salesforce command line tool to convert your existing project (more information here) or you can use Gearset.

Creating an SFDX project with Gearset

To create an SFDX project with Gearset, you'll need to create an empty repository in git then add an SFDX project file. This project file can control various bits of configuration but when creating a new project, it just needs some boilerplate.

Create a new file in the root of the blank repository called sfdx-project.json with this content:

    "packageDirectories": [
            "path": "unpackaged",
            "default": true

    "namespace": "",
    "sfdcLoginUrl": "",
    "sourceApiVersion": "44.0"

Alternatively, you can copy or fork our sample repository.

You can then create new a deployment in Gearset with this repository as the target. If you already have a regular Salesforce project in source control, then set this as the source. If you're starting from a Salesforce org, use this as the source instead.

This is to say Gearset can transform a repo in Metadata API format to a repo in Salesforce DX format without having to deploy to any intermediate org or local CLI project. This is a super useful feature to help people transitioning to the DX format.

The metadata you select for deployment will then be created using the SFDX project structure, thanks to the SFDX project file you created.

Did this answer your question?