Using SalesforceDX, I am currently having trouble finding a way to ignore a lightning application created in my scratch org; the force:source:status always seem to include it.

The name of the Aura bundle is "preview" and the current .forceignore file read this :


The file is placed at the root of the project and works fine when I try to ignore other files such as a given object or profile. But when it comes to AuraDefinitionBundle, I am having trouble finding out the right exclusion syntax. As seen above, I tried to exclude the app file which is the name that the force:source:status command return me for the application, the folder name or any folder with that name.

Nothing seems to work and I figured it might be rather simple but I am missing it and the documentation on this seems limited on salesforce side. I tried a bunch of other things from related .gitignore doc but without success.

  • You normally need to use / instead of \. I think it should look something like **/aura/preview/*
    – sfdcfox
    Jan 22, 2018 at 19:35
  • DX is supposed to use the gitignore format. Does this help?
    – sfdcfox
    Jan 22, 2018 at 19:39
  • @sfdcfox I tried replacing the slashes and toyed with the suggestion, nothing worked for that. Also I looked into the gitignore and tried a couple of stuff but I am not quite the advanced user of git. I feel like in git it would work given the folder structure it comes out as when I pull aura bundles from an org, but I just have no success currently with it and I feel like I am missing something. Jan 22, 2018 at 19:48

1 Answer 1


I've had great trouble getting my head round the various forceignore syntaxes. As of now (my version is sfdx-cli/7.48.0-a71f8c6899) the following is what I've found for Aura Definition Bundle entries (note I'm unsure why the OP's preview entry did not work);

  • You don't need to supply an extension (unlike the other meta)
  • Be careful that the entries have implicit wild carding.

An example; If my sfdx force:source:status return this;

STATE       FULL NAME              TYPE                  PROJECT PATH
──────────  ─────────────────────  ────────────────────  ────────────
Remote Add  setExpId/setExpId.evt  AuraDefinitionBundle

Then I can ignore that setExpId bundle with this entry in the .forceignore;


You must log in to answer this question.

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