After playing a bit with Salesforce DX, pushing and pulling stuff, I decided to try out the .forceignore file, but I can't seem to make it work.

At the moment I have the following structure:

file directory

Project structure

and my .forceignore file contains the following lines:


Nonetheless, everytime I modify the files and I push the source, they get pushed. To a point, I thought about deleting them from the scratch org and re-creating them, but still.

Have I written the paths correctly? Or am I missing something here?

  • This .forceignore file is located at force-app/.forceignore, it looks like?
    – sfdcfox
    Commented Oct 2, 2017 at 20:50
  • @sfdcfox no, it's in the root directory as it should. I added another image for more clarity. Commented Oct 2, 2017 at 20:53
  • @sfdcfox I'm still googling and I found this: Add the file to the Metadata retrieve directory (with package.xml) for force:mdapi:convert.. I haven't done this nor I know what it means. Could this be the issue? Commented Oct 2, 2017 at 20:57
  • I linked that in my (now deleted) answer. The primary purpose of force:mdapi:convert is to use an older Force.com IDE project to convert it to the newer folder design that DX uses. This doesn't apply to you if you're not using force:mdapi:convert.
    – sfdcfox
    Commented Oct 2, 2017 at 20:58
  • 4
    Might just be a font issue, but when I look at your screenshots the file name looks like it has a space after the period. E.g. . forceignore. Commented Oct 3, 2017 at 18:42

1 Answer 1


I forgot to answer this question!

Just like @DanielBallinger said in the comments below the answer, there was a space between the period and the forceignore... so obviously it wasn't working (duh!).

You must log in to answer this question.

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