[BUG] Claude edits .gitignore

Resolved 💬 7 comments Opened May 2, 2025 by motlin Closed May 14, 2025

Environment

  • Claude CLI version: 0.2.100 (Claude Code)
  • Operating System: osx
  • Terminal: iTerm2

Bug Description

In a recent version from the last few days, Claude code started writing into .gitignore:

**/.claude/settings.local.json

The .gitignore file is checked in and shared with my team. Not everyone uses Claude code (unfortunately) so it's not appropriate to write developer-specific configuration into a shared file like .gitignore.

Expected Behavior

Ideally, the CLI would prompt me for permission before ignoring anything, and even with permission, it should only write into .git/info/exclude, which is a git config file that is not part of the repository.

Additional Context

Also, I added /.claude/ into my .git/info/exclude file, so these files are already ignored. I think the CLI is adding ignore patterns without checking whether they are necessary.

View original on GitHub ↗

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