Skip to content

[BUG] Claude edits .gitignore #944

Description

@motlin

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.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingplatform:macosIssue specifically occurs on macOS

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions