Does .forceignore have a mechanism to ignore most files except for specific files?

With .gitignore, a ! represents the negation of the pattern – see Make .gitignore ignore everything except a few files.

So I thought this in .forceignore might ignore all the pages except the specific one:


but it seems to have no effect. (Though commenting out **/pages/** doesn’t either; not sure what is going on here.)

Is there a way to do this in .forceignore?


I have had issues with this myself in the past I believe .forceignore works slightly differently to .gitignore (I may be wrong here) I believe what you are after is the following.

# ignore all pages    

# include setup page

If you wish to ignore just the setup page

# ignore specific file

Source : Link , Question Author : Keith C , Answer Author : Crispy

Leave a Comment