We have a large monorepo with a .gitignore
in the root of the repo. Rather than opening the entire monorepo, we open an individual subdirectory in the workspace.
Cursor only looks in the workspace root for .gitignore
but it should continue searching up until it gets to the git repo root, even if the git repo root is not included in the workspace.
Cursor should then exclude those files from search, auto-complete when using CMD-P to open files, indexing, etc.
My temporary workaround is to add a copy of the root .gitignore
to each individual sub-directory I add to the workspace.
Directory structure:
.gitignore
services/service-A
services/service-B
I add services/service-A
as a workspace root and it does not ignore files from .gitignore
. To fix this I have to copy .gitignore
to services/service-A/.gitignore
which is not ideal.