# Global cursorignore negations do not override .gitignore rules (unless specific syntax used)

**URL:** <https://forum.cursor.com/t/global-cursorignore-negations-do-not-override-gitignore-rules-unless-specific-syntax-used/101263>\
**Category:** Bug Reports\
**Created:** [June 6, 2025, 10:25pm UTC](https://forum.cursor.com/t/global-cursorignore-negations-do-not-override-gitignore-rules-unless-specific-syntax-used/101263 "2025-06-06T22:25:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jade.x](https://avatars.discourse-cdn.com/v4/letter/j/a9a28c/32.png) [@jade.x](https://forum.cursor.com/u/jade.x)\
**Post date:** [June 6, 2025, 10:25pm UTC](https://forum.cursor.com/t/global-cursorignore-negations-do-not-override-gitignore-rules-unless-specific-syntax-used/101263/1 "2025-06-06T22:25:45Z")

</div>

### Describe the Bug

I’m on version `v1.0.0` but I noticed this behavior on earlier versions too.

I have a directory in my .gitignore

```auto
# .gitignore

.my-docs

```

I’d like to have cursor index these docs, so I added a global rule in my user settings to negate the .gitignore rule as I’ve seen described in the docs.

```auto
# settings.json

"cursor.general.globalCursorIgnoreList": [
    ...
    "!.my-docs/"
  ],

```

I do not have a local `.cursorignore` file in my project and I do not want to use a local `.cursorignore` file in my project for implementation-specific reasons (this is meant to be a global rule we’re managing for all our company users).

When I do add a local `.cursorignore` file with the negation rule, it succeeds in overriding the .gitignore and it does index the directory. But as stated before, I want the global cursor ignore to work.

### Steps to Reproduce

A coworker said he is not encountering this issue and the global cursor ignore negation rule is working for him, so I’m not sure how to reproduce this except outside of my specific setup and with the scenario described above.

We are both on version `v1.0.0`

### Expected Behavior

When a file or directory is in `.gitignore`, and a negation rule is added to the global cursor ignore rules in the user’s settings.json for that file or directory, the file or directory should get indexed.

### Operating System

MacOS

### Current Cursor Version (Menu → About Cursor → Copy)

Version: 1.0.0  
VSCode Version: 1.96.2  
Commit: 53b99ce608cba35127ae3a050c1738a959750860  
Date: 2025-06-04T19:21:22.523Z (2 days ago)  
Electron: 34.5.1  
Chromium: 132.0.6834.210  
Node.js: 20.19.0  
V8: 13.2.152.41-electron.0  
OS: Darwin arm64 24.0.0

### Does this stop you from using Cursor

No - Cursor works, but with this issue

---

<div class="post-metadata">

**Author:** ![jade.x](https://avatars.discourse-cdn.com/v4/letter/j/a9a28c/32.png) [@jade.x](https://forum.cursor.com/u/jade.x)\
**Post date:** [June 6, 2025, 11:29pm UTC](https://forum.cursor.com/t/global-cursorignore-negations-do-not-override-gitignore-rules-unless-specific-syntax-used/101263/2 "2025-06-06T23:29:16Z")

</div>

I have an update that got it working for me though I still think this is a bug.

When I updated my `.gitignore` rule from `.my-docs` to `.my-docs/**`, the global cursor ignore negation finally worked and my directory got indexed while it still remained gitignored.

So in summary I got this working:

```auto
# .gitignore

.my-docs/**

```

```auto
# settings.json

"cursor.general.globalCursorIgnoreList": [
    ...
    "!.my-docs/"
  ],

```

Still a bug however because there appears to be some sort of mismatch between valid `.gitignore` rules and the global cursor ignore negations.

Quite happy with the feature overall though. Thanks!

---

<div class="post-metadata">

**Author:** ![system](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/system/32/127254_2.png) [@system](https://forum.cursor.com/u/system)\
**Post date:** [July 6, 2025, 11:29pm UTC](https://forum.cursor.com/t/global-cursorignore-negations-do-not-override-gitignore-rules-unless-specific-syntax-used/101263/3 "2025-07-06T23:29:54Z")

</div>

Closed on July 6, 2025, 11:29pm UTC

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