-
Notifications
You must be signed in to change notification settings - Fork 83.1k
Add Cursor editor ignore files to Python.gitignore #4633
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for opening this back up with the specific docs mentioned ❤️
# Cursor | ||
# Cursor is an AI-powered code editor.`.cursorignore` specifies files/directories to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: extra and missing whitespace
# Cursor | |
# Cursor is an AI-powered code editor.`.cursorignore` specifies files/directories to | |
# Cursor | |
# Cursor is an AI-powered code editor. `.cursorignore` specifies files/directories to |
# exclude from AI features like autocomplete and code analysis. Recommended for sensitive data | ||
# refer to https://docs.cursor.com/context/ignore-files | ||
.cursorignore | ||
.cursorindexingignore |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removing the end-of-file newline disrupts line counting and concatenation. I hope it can be quickly restored back.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey sorry I missed this in my review @covracer. I'll get a PR together to restore that newline 👍
Their docs explicitly mention
Emphasis on global. Not everyone uses Cursor, and you're cluttering the gitignore needlessly. |
Reasons for making this change
This change adds
.cursorignore
and.cursorindexingignore
to Python.gitignore because:Security Protection
These files commonly contain references to sensitive paths (
.env
,config/secrets/
, local debug files) that should never be committed. Unlike.gitignore
, they're designed for editor-specific exclusions.Editor Ecosystem Standard
Cursor (an AI-powered editor growing in Python development) follows VS Code's ignore handling paradigm. We already ignore similar editor files (
.vscode/
,.idea/
).Dual-Purpose Ignore Files
•
.cursorignore
: User-specific patterns (equivalent to personal.gitignore
)•
.cursorindexingignore
: Controls AI feature access (prevents analysis of generated code/assets)Links to documentation supporting these rule changes
https://docs.cursor.com/context/ignore-files
https://docs.cursor.com/context/codebase-indexing
If this is a new template
Link to application or project’s homepage: TODO
Merge and Approval Steps