.stignore a folder in any subdirectory

Hi there. Please forgive me if it’s been asked before, but I’ve searched and tried many options.

Let’s say I have the following directory structure:

foo
bar/
    frobble/
        .venv/

I have the .stignore file at the root.

How do I ignore the folder name .venv?

Enter its name into .stignore:

bar/frobble/.venv

Or, to ignore that directory anywhere:

.venv

What did you try that didn’t work?

I tried just entering .venv, which didn’t work.

The full path will work, but I need an .stignore that ignores all occurrences of .venv

Right. As I said:

to ignore that directory anywhere:

.venv

.venv in the .stignore file indeed works. I don’t know what I did earlier. Thanks.