Ignore Files
Ignore Files
Overview
.cursorignore
: Makes a best-effort attempt to exclude files from both AI features and indexing.cursorindexingignore
: Controls only which files are indexed for search and context (same as the old .cursorignore
)As of 0.46, .cursorignore
attempts to exclude files from both AI access and indexing (similar to the previously unreleased.cursorban
). For indexing-only control like the old.cursorignore
, use.cursorindexingignore
.
.cursorignore
The .cursorignore
is best-effort, meaning we do not guarantee that files in it are blocked from being sent up. We may have bugs that allow ignored files to be sent up in certain cases. Please let us know if you find bugs like that and we will do our best to fix!
.cursorignore
file makes a best-effort attempt to exclude files from both AI features and indexing. This is useful for:.cursorignore
will be excluded from Cursor’s AI features in a best-effort way:.cursorindexingignore
.cursorindexingignore
files automatically inherits all patterns from your.gitignore
files
.cursorindexingignore
file only controls which files are indexed for search and context features. This provides the same indexing control as the old .cursorignore
. Use this file when you want to:.cursorindexingignore
can still be manually included as context or accessed by AI features - they just won’t be automatically indexed or included in search results.File Format
.gitignore
. Here are some examples:Basic Patterns
# Ignore all files in the `dist` directory
dist/
# Ignore all `.log` files
*.log
# Ignore specific file `config.json`
config.json
Advanced Patterns
*.py
files in the app
directory:# ignore everything
*
# do not ignore app
!app/
# do not ignore directories inside app
!app/*/
!app/**/*/
# don't ignore python files
!*.py
Troubleshooting
.gitignore
exactly. If you encounter issues:1.
2.
3.
git check-ignore -v [file]
to understand matching!
) must negate a previous patternModified at 2025-03-26 08:58:05