Exclude exactly one folder in .stignore

Hi, I have a big repository where I need to exclude exactly one directory. To illustrate it, in the following example I need to exclude temp images but not template images:

/folder/subfolder1/temp/images /folder/subfolder1/templates/images

How should I set it in .stignore? I try writing the full path but it doesn’t work. With best regards Christian

Create an ignore file containing the line images in /folder/subfolder1/temp.

Edit: folder patterns should probably be supported in the ignore file, but they are currently not. Hence, temp/images in an ignore file won’t work.

If I understand you right there is no explicit folder notation in stignore? ‘picture’ would ignore the folder picture as well as the file picture.jpg, right?

This thread is out of date and the answer isn’t valid any more - that’s the danger of digging up year old threads for a quickly evolving software. :wink:

The correct answer to the original question today is “Put /folder/subfolder1/temp/images in .stignore.”

Putting picture in the .stignore (which lives at the root of the folder) matches only picture not picture.jpg nor picture-something-else.

1 Like

Hence “picture” would match file “picture” as well as folder “picture”, right?

Yes, but if you actually use a path as suggested above that situation is impossible.