8000 Add Cursor editor ignore files to Python.gitignore by Wuhall · Pull Request #4633 · github/gitignore · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

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 G 8000 itHub”, 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

Merged
merged 2 commits into from
May 15, 2025

Conversation

Wuhall
Copy link
@Wuhall Wuhall commented May 15, 2025

Reasons for making this change

This change adds .cursorignore and .cursorindexingignore to Python.gitignore because:

  1. 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.

  2. 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/).

  3. 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

  1. Official Cursor ignore file documentation:
    https://docs.cursor.com/context/ignore-files
  2. Official Cursor suggestion to exclude:
    https://docs.cursor.com/context/codebase-indexing
image

If this is a new template

Link to application or project’s homepage: TODO

Merge and Approval Steps

  • Confirm that you've read the contribution guidelines and ensured your PR aligns
  • Ensure CI is passing
  • Get a review and Approval from one of the maintainers

@Wuhall Wuhall requested a review from a team as a code owner May 15, 2025 01:24
Copy link
Collaborator
@dooleydevin dooleydevin left a 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 ❤️

@dooleydevin dooleydevin merged commit 9cabb94 into github:main May 15, 2025
Comment on lines +176 to +177
# Cursor
# Cursor is an AI-powered code editor.`.cursorignore` specifies files/directories to

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

Suggested change
# 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
Copy link
@covracer covracer May 19, 2025

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.

Copy link
Collaborator

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 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0