Codebase indexing following .gitignore too strictly

Hi,

My .gitignore is as follows:

*

# general
!.gitignore

# go
!main.go
!cmd/*.go
!go.{mod,sum}

This means that I need to add my files through git add file.go -f and then it’ll get tracked.

But my Codebase indexing only has the following:

.gitignore
go.sum
go.mod

The fix would be to index the files that are already tracked before enforcing the .gitignore.

Hi there,

do you have a .cursorindexignore file or .cursorignore file?

To override what is ignored by .gitignore for indexing in Cursor, you can use the .cursorignore and .cursorindexingignore files. Cursor respects ignore patterns in .gitignore, .cursorignore, and .cursorindexingignore. If you want to include a file or directory that would otherwise be ignored (for example, by .gitignore), you can add it to your .cursorignore file with a ! prefix.

Note that in certain cases this still does not result in the files being indexed.

Negative patterns don’t actually work, at least not in a way that matches documentation or is otherwise comprehensible.

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