untrack .claude/settings.local.json from every repo in ~/ and add it to
#2
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Feature requests queue
2026-05-13 — fleet chore: untrack
.claude/settings.local.jsonfrom every repo in~/and add it to each project's.gitignore. The file is Claude Code's per-machine permissions store and is meant to be machine-specific (it's the sibling of the checked-in.claude/settings.json); checking it in causes cross-machine permission drift and unnecessary diff noise on every Claude session.Scope. Verified read-only against
~/<repo>/.giton 2026-05-13:.claude/settings.local.jsontracked?.gitignore?Per-project recipe (7 untrack+gitignore PRs, 2 gitignore-only PRs, 1 no-op):
.claude/settings.local.jsonmust NOT be deleted from disk in the user's primary checkout. Usegit rm --cached .claude/settings.local.json(the--cachedflag drops it from the index while leaving the file on disk in the worktree; the user's primary~/<repo>checkout is untouched until they pull, and once pulled the file already exists and gitignore prevents re-tracking). For projects where the file is already untracked (portman, tradebot), just add the.gitignoreline..gitignore. Add a single line.claude/settings.local.json(or under an existing# Claude Codesection if one exists). If the project's.gitignorealready has a.claude/pattern that would cover this file, double-check the intent — we want the sibling.claude/settings.json(and.claude/commands/,.claude/agents/, etc.) to remain checked in; onlysettings.local.jsonis machine-specific. If a broader.claude/*rule is present, narrow it.chore:commit per project. Suggested message:chore: untrack .claude/settings.local.json (machine-specific). For gitignore-only PRs:chore: gitignore .claude/settings.local.json (machine-specific).~/roles/_sub-claude-rules.md): branchchore/gitignore-claude-settings-local, auto-merge via the Gitea sync-from-main precondition. Refactor pass: noop on a sub-5-line diff. Security pass: zero in scope (gitignore + index-only change; no application code, no env, no auth).git rm --cached, rungit statusand confirm: (a).claude/settings.local.jsonshows up as a staged deletion, (b) the file still exists on disk (ls -la .claude/settings.local.jsonsucceeds), (c)git check-ignore .claude/settings.local.jsonreturns the path (proving gitignore now covers it). No other behavioral verification needed — this is purely a VCS-metadata change.npm ci/tsc/vitest/docker buildrequired. This is a meta-config change with zero code or dep impact. Skip the usual implementer test gauntlet.Acceptance.
git ls-files .claude/settings.local.jsonreturns empty in every repo onmain.git check-ignore .claude/settings.local.jsonreturns the path in every repo onmain.~/<repo>/.claude/settings.local.jsonfiles are untouched (still exist, still contain the local permission rules) — verify by spot-checking 2-3 projects after the PRs land..claude/settings.json(the checked-in counterpart) is accidentally untracked or gitignored — the rule must be specific tosettings.local.json.Filer notes.
~/.claude/CLAUDE.mdso new projects start with the gitignore line from day 1. Recommended addition: a short section under the existing Docker / iOS-font-size standing rules saying "Whenever you bootstrap a new repo or notice an unignored.claude/settings.local.jsonin any project, add it to that project's.gitignore. Never checksettings.local.jsonin — it's the machine-specific sibling of the checked-in.claude/settings.jsonand tracking it causes cross-machine permission drift." This session can ship that rule add directly (the~/.claude/CLAUDE.mdfile is fleet-maintenance scope, not project-code scope) — the implementer's job is the per-project retrofit only.Resolved: PR #4 (merge_commit
e8d92f58dc)