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

[BUG] Claude Code no longer adds local settings file to .gitignore when it is created

Open adamrothman opened this issue 3 months ago • 3 comments

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

When Claude Code creates a .claude/settings.local.json file, e.g. because I allowed it to always run go build commands in my project, that local settings file is not being added to my project's .gitignore file.

What Should Happen?

Claude Code should add .claude/settings.local.json to my .gitignore when it creates the local settings file. I think this is a regression, because the documentation here says:

.claude/settings.local.json for settings that are not checked in, useful for personal preferences and experimentation. Claude Code will configure git to ignore .claude/settings.local.json when it is created.

And yet, that's not what's happening.

Error Messages/Logs


Steps to Reproduce

  1. Start Claude Code in a project without a .claude/settings.local.json file
  2. Do something that causes CC to create the local settings file, e.g. give it permission to run some kind of command without asking you
  3. Note that the local settings file is not added to .gitignore

Claude Model

Sonnet (default)

Is this a regression?

Yes, this worked in a previous version

Last Working Version

don't know

Claude Code Version

v2.0.46

Platform

AWS Bedrock

Operating System

macOS

Terminal/Shell

Other

Additional Information

No response

adamrothman avatar Nov 19 '25 22:11 adamrothman

This is still happening in v2.0.62

adamrothman avatar Dec 09 '25 22:12 adamrothman