npx / vscode-hide-gitignored

19 stars 7 forks source link

the tool misunderstands folder ignores #11

Closed cyberw closed 4 years ago

cyberw commented 4 years ago

In my repo I have a .env/ folder in my root, and a file called .env (in a subfolder called src)

In my .gitignore I have the following line: .env/

This makes git ignore the .env/ folder, but not the .env file.

But when I run the tool it adds "**/.env/": true

... which makes vs code ignore both the .env/ folder and the .env file.

cyberw commented 4 years ago

I think what it should add is just ".env/"

cyberw commented 4 years ago

Hmm. maybe it was actually an error in my .gitignore. Adding a prefix / (to make it /.env/ in my .gitignore) made it work.