Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

taqman's avatar

Netbeans exclude .env

how to include it?

0 likes
5 replies
mikebarwick's avatar
Level 5

I don't use NETBEANS, but StackOverflow should be your friend... ;)

Go to Tools -> Options -> Miscellaneous -> Files.

The property, Ignore Files has this as a default:

^(CVS|SCCS|vssver.?\.scc|#.*#|%.*%|_svn)$|~$|^\.(?!htaccess$).*$

Remove the last portion: .*

Netbeans hides dot files & directories.

2 likes
kpc25's avatar

Thanks mikebarwick! It did show the .env file after the modification. But it was showing the .gitignore and .gitattributes files before the modification too. Just a little curious...

frezno's avatar

But it was showing the .gitignore and .gitattributes files before the modification too.

that's because the original Ignored File Pattern is:

^(CVS|SCCS|vssver.?\.scc|#.*#|%.*%|_svn)$|~$|^\.(?!(htaccess|git.+|hgignore)$).*$

which excludes .git* files

you can delete the complete line, if you want to. That makes you see all files.

insult2injury's avatar

I just added env after hgignore to keep everything else the same

^(CVS|SCCS|vssver.?\.scc|#.*#|%.*%|_svn)$|~$|^\.(?!(htaccess|git.+|hgignore|env)$).*$
kanasite's avatar

I would suggest

^(CVS|SCCS|vssver.?.scc|#.#|%.%|_svn)$|~$|^.(?!(htaccess|git.+|hgignore|env|env.+)$).*$

it also keep everything with env. prefix eg: env.example, env.production

Please or to participate in this conversation.