Cannot unignore item in global list (!.env.template)

Describe the Bug

I want to unignore just .env.template which is excluded by global rule **/.env.*". Adding !.env.template to .cursorignore does not work.

It seems the only way to do is using .vscode/settings.json to make to into git? I don’t think duplicating a full list into that settings is a good idea to unignore just this single file. Unlikely anyone will update the list when more files added by Cursor later.

Steps to Reproduce

  1. Create .cursorignore
  2. Add !.env.template into it

Expected Behavior

Allow Cursor to access .env.template

Operating System

Windows 10/11

Current Cursor Version (Menu → About Cursor → Copy)

Version: 1.2.4 (user setup)
VSCode Version: 1.99.3
Commit: a8e95743c5268be73767c46944a71f4465d05c90
Date: 2025-07-10T17:09:01.383Z
Electron: 34.5.1
Chromium: 132.0.6834.210
Node.js: 20.19.0
V8: 13.2.152.41-electron.0
OS: Windows_NT x64 10.0.26100

Additional Information

Cursor IDE connects to WSL

Does this stop you from using Cursor

No - Cursor works, but with this issue

Is .env.template the actual name of your env file?

I replaced ‘template’ with ‘local’ or ‘production’ or ‘*’ to cover them all and it is working in v1.2.2 on Linux.

My .cursorignore file:

!.env
!.env.*

I’m not going to leave it that way though because of security concerns.

It is not the env name. It is actually the template.

Just restarted Cursor and it works now. Instead, it seems to be a side-effect of another bug. I am going to close this and try to reproduce it.

Thank you for your test!

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