Why is my .stignore file not working?

I’ve tried a few variations of this and can’t crack it… hopefully someone can tell me what’s wrong because this would be a really handy feature to have.

// Ignore everything

// except

// Even if they're in subdirectories


Because you start by ignoring everything…

I figured it would cascade…

And don’t hope it will be that easy to handle the directories :confused:

unignoring must be with full path.

No, exact same matching rules apply for ignoring and unignoring.

The problem is what @brunod said: The first rule to match does apply. So you need to move the include rules to the top.
And unfortunately he is again right with subdirs not being that easy. Currently you need to specify every subdir where files should be included. There’s threads in the forum about how it works, don’t want to search them on the phone. However there is a PR open at the moment that would solve this problem, so this might get easier soonish.

1 Like

The solution I found was just to selectively ignore what I don’t want using wildcards. It’s not as robust, but it’ll do the trick.


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.