claude-code - 💡(How to fix) Fix [FEATURE] Support patterns in .claudeignore alongside .gitignore

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Error Message

Users currently work around this by adding exclusions to .gitignore directly, but this pollutes the shared project config with Claude-specific rules that other tools don't need. Alternatively, users duplicate paths in both files, which is error-prone.

RAW_BUFFERClick to expand / collapse

name: "\U0001F389 Feature Request" description: Suggest a new feature or enhancement for Claude Code title: "[FEATURE] Support patterns in .claudeignore alongside .gitignore" labels:

  • enhancement

Thanks for suggesting a feature!

We love hearing ideas from our community. Please help us understand your use case by filling out the sections below. Before submitting, please check if this feature has already been requested.

Preflight Checklist

  • I have searched existing requests and this feature hasn't been requested yet
  • This is a single feature request (not multiple features)

Problem Statement

When working in large monorepos, .claudeignore only respects .gitignore rules by reference, not as a first-class citizen. This means users must maintain parallel ignore files and cannot extend .gitignore patterns with Claude-specific exclusions. Additionally, the current behavior is unclear: users expect .claudeignore to support the same glob/file-pattern syntax as .gitignore, but the interaction between the two files is not documented.

Proposed Solution

Treat .claudeignore as a standalone ignore file that supports the same pattern syntax as .gitignore (e.g., dir/, *.log, **/node_modules), and merge its rules with .gitignore rather than only respecting .gitignore's explicit exclusions. Document the precedence and interaction clearly so users understand exactly what gets ignored and why.

Alternatives

Users currently work around this by adding exclusions to .gitignore directly, but this pollutes the shared project config with Claude-specific rules that other tools don't need. Alternatively, users duplicate paths in both files, which is error-prone.

Priority

Medium - Would be very helpful

Feature Category

CLI commands and flags

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix [FEATURE] Support patterns in .claudeignore alongside .gitignore