Skip to content

chore: gitignore Claude Code local settings - #1284

Closed
ogenstad wants to merge 1 commit into
stablefrom
pog-em/gitignore-claude-local
Closed

chore: gitignore Claude Code local settings#1284
ogenstad wants to merge 1 commit into
stablefrom
pog-em/gitignore-claude-local

Conversation

@ogenstad

@ogenstad ogenstad commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

What

Ignore .claude/settings.local.json - Claude Code's per-developer local settings file (personal permission allowlists and local overrides).

Why

  • It's the "local, not shared" counterpart to .claude/settings.json and is meant to stay out of version control.
  • The repo intentionally tracks the shared parts of .claude/ (commands, rules, skills), so .claude/ isn't blanket-ignored; this adds a surgical ignore for just the local settings file.
  • Without it, the file shows up as untracked/modified in git status for every developer and risks being committed by accident.

Verified .claude/settings.local.json is not currently tracked, so the ignore rule alone is sufficient (no git rm --cached needed).


Summary by cubic

Ignores Claude Code's per-developer local settings file (.claude/settings.local.json) so it no longer appears in git status or risks being committed. Shared .claude/ config stays tracked, and since the file isn't currently tracked, no git rm --cached is needed.

Written for commit dbb080d. Summary will update on new commits.

Review in cubic

Ignore .claude/settings.local.json, Claude Code's per-developer local
overrides file. The shared .claude/ config (commands, rules, skills)
stays tracked; only the local settings file is excluded.
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying infrahub-sdk-python with  Cloudflare Pages  Cloudflare Pages

Latest commit: dbb080d
Status: ✅  Deploy successful!
Preview URL: https://07a47433.infrahub-sdk-python.pages.dev
Branch Preview URL: https://pog-em-gitignore-claude-loca.infrahub-sdk-python.pages.dev

View logs

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 1 file

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name=".gitignore">

<violation number="1" location=".gitignore:46">
P3: The new rule is a no-op: line 7 `**/*.local.*` already matches and ignores `.claude/settings.local.json`. git check-ignore against a clean repo with only that pattern confirms it is already covered, so this added line changes nothing. Remove it (or the intent is already satisfied by the existing pattern).</violation>
</file>

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread .gitignore
.specify/feature.json

# Claude Code per-developer local settings (shared config stays tracked)
.claude/settings.local.json

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P3: The new rule is a no-op: line 7 **/*.local.* already matches and ignores .claude/settings.local.json. git check-ignore against a clean repo with only that pattern confirms it is already covered, so this added line changes nothing. Remove it (or the intent is already satisfied by the existing pattern).

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At .gitignore, line 46:

<comment>The new rule is a no-op: line 7 `**/*.local.*` already matches and ignores `.claude/settings.local.json`. git check-ignore against a clean repo with only that pattern confirms it is already covered, so this added line changes nothing. Remove it (or the intent is already satisfied by the existing pattern).</comment>

<file context>
@@ -41,3 +41,6 @@ infrahub_sdk/_version.py
 .specify/feature.json
+
+# Claude Code per-developer local settings (shared config stays tracked)
+.claude/settings.local.json
</file context>

@ogenstad

Copy link
Copy Markdown
Contributor Author

Closing: this change is a no-op. The existing **/*.local.* pattern (line 7 of .gitignore) already ignores .claude/settings.local.json, as the cubic review correctly flagged and as git check-ignore confirms against stable. Nothing to add.

@ogenstad ogenstad closed this Aug 26, 2026
@ogenstad
ogenstad deleted the pog-em/gitignore-claude-local branch August 26, 2026 18:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant