[FEATURE] Support patterns in .claudeignore alongside .gitignore

Resolved 💬 2 comments Opened May 30, 2026 by fuleinist Closed Jun 3, 2026

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

  • [x] I have searched existing requests and this feature hasn't been requested yet
  • [x] 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

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗