claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

[Feature Request] Add .claudecodeignore file support or option to disable Git indexing

Open yamatovision opened this issue 1 year ago • 3 comments

I'd like to request a feature to allow ignoring specific directories (especially .git) when Claude Code indexes a project.

Problem

When opening large projects in Claude Code, it spends considerable time indexing directories like .git, node_modules, and cache folders, causing slow startup times. In my case, loading the AppGenius project takes nearly a minute due to it reading the .git directory and other large folders.

The Git context is often not necessary for my workflow and actually causes two problems:

  1. Significantly slower startup times
  2. Sometimes Claude makes unsolicited suggestions based on Git history that aren't relevant to my current task

Proposed Solutions (either would help)

  1. Implement support for a .claudecodeignore file that works like .gitignore
  2. Add a simple setting to disable Git indexing completely
  3. Make Git indexing opt-in rather than the default behavior

Benefits

  • Significantly faster project loading times (potentially 5-10x faster based on my testing)
  • More focused assistance without Git-related tangents
  • Better user experience for those who don't need Git context in their work

I believe Claude Code would be much more efficient without automatic Git indexing, or at least with the option to disable it. The tool was more responsive before this Git integration was added, and I'd appreciate having control over whether this feature is active.

yamatovision avatar May 14 '25 22:05 yamatovision

This shouldn't be happening. If you have a .gitignore, Claude Code should respect it.

wolffiex avatar May 15 '25 15:05 wolffiex

Claude Code does not do any sort of indexing. To make it so Claude does not read specific files/directories, use Read deny rules: https://docs.anthropic.com/en/docs/claude-code/settings#permissions.

bcherny avatar May 16 '25 16:05 bcherny

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.

github-actions[bot] avatar Aug 10 '25 14:08 github-actions[bot]