7

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:

force-app/main/default/apex-module1/TestingForceIgnore.cls
force-app/main/default/apex-module1/TestingForceIgnore.cls-meta.xml

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 Oct 2 '17 at 20:50
  • @sfdcfox no, it's in the root directory as it should. I added another image for more clarity. – Javier García Manzano Oct 2 '17 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? – Javier García Manzano Oct 2 '17 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 Oct 2 '17 at 20:58
  • 3
    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. – Daniel Ballinger Oct 3 '17 at 18:42
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!).

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.