[BUG] Claude Code no longer adds local settings file to .gitignore when it is created
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.jsonfor settings that are not checked in, useful for personal preferences and experimentation. Claude Code will configure git to ignore.claude/settings.local.jsonwhen it is created.
And yet, that's not what's happening.
Error Messages/Logs
Steps to Reproduce
- Start Claude Code in a project without a
.claude/settings.local.jsonfile - 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
- 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
This is still happening in v2.0.62