Cursor · tool · fg-0518

.cursorignore negation does not re-include a file inside an ignored folder

If you see !public/assets/style.css has no effect after public/*, the cause and the fix for Cursor are below, last verified 2026-10-15.

Verified Oct 2026trust 50/100
Symptom
!public/assets/style.css has no effect after public/*The file stays hidden from Agent although a ! line names it
Cause
Excluded directories are not traversed, so a negation for a file below the excluded level is never seen. This matches how gitignore handles nested negation.
Fix
Exclude the nested folder's contents explicitly, then negate the file, and test the pattern with git check-ignore -v.
Apply
public/assets/* !public/assets/style.css
Affected
Cursor .cursorignore, as of 2026-10
Sources

Last verified 2026-10-15 · Confirmed by 0 builders

Related traps

Have your agent know this before it fails

$ /plugin marketplace add getfootgun/footgun
$ /plugin install footgun@footgun