Skip to content

chore: ignore .claude/, Claude Code's local state - #62

Merged
bgent19 merged 1 commit into
mainfrom
chore/gitignore-claude
Aug 14, 2026
Merged

chore: ignore .claude/, Claude Code's local state#62
bgent19 merged 1 commit into
mainfrom
chore/gitignore-claude

Conversation

@bgent19

@bgent19 bgent19 commented Aug 14, 2026

Copy link
Copy Markdown
Owner

Adds .claude/ to .gitignore.

Claude Code writes two things there: per-session settings.json, and scratch git worktrees under .claude/worktrees/. Both are local tooling state rather than repo configuration — nothing in the directory changes how the optimizer builds, tests or serves — so it should not show up as untracked noise in git status or arrive in anyone's diff.

Ignoring the directory wholesale is the simple call. The alternative is to track .claude/settings.json as shared team config and ignore only .claude/worktrees/ and settings.local.json. That is worth doing if you ever want hooks or permissions committed for whoever picks the repo up, but there is nothing in the current settings file worth sharing — it holds a single local worktree-isolation flag.

Test plan

  • git check-ignore -v .claude/settings.json resolves to this rule
  • git status is clean on a fresh checkout
  • No tracked files are affected — nothing under .claude/ was ever committed, so this changes no history

Claude Code writes per-session settings and scratch worktrees under
.claude/. It is local tooling state, not repo configuration -- nothing in
it changes how the optimizer builds, tests or serves -- so it should not
arrive in a diff.
@bgent19
bgent19 merged commit f8034bb into main Aug 14, 2026
1 check passed
@bgent19
bgent19 deleted the chore/gitignore-claude branch August 14, 2026 22:16
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