Skip to content

gitignore: .claude is per-user state except .claude/skills - #3306

Merged
mgravell merged 1 commit into
mainfrom
marc/gitignore-agent-local
Oct 29, 2026
Merged

mgravell merged 1 commit into
mainfrom
marc/gitignore-agent-local

Conversation

@mgravell

Copy link
Copy Markdown
Member

Ignore everything under `.claude/` except `.claude/skills/`, which is the repo-content part (three tracked SKILL.md files, referenced from AGENTS.md). Everything else the tool creates there - `settings.json`, `settings.local.json`, `worktrees/`, hooks, commands, agents - is per-user state.

Written as `.claude/*` + `!.claude/skills/` rather than `.claude/`, because git cannot re-include a path inside an excluded directory; with the directory form a new skill would need `git add -f` and would be invisible to `git status`. Verified with `git check-ignore`: the skill files are not matched, the rest is.

Also drops the duplicate `.codex` entry.

`v4` already carries `.claude/worktrees/`; this supersedes it and will be taken into `v4` via the normal main merge.

@mgravell
mgravell merged commit 1d1cfd5 into main Oct 29, 2026
4 of 5 checks passed
@mgravell
mgravell deleted the marc/gitignore-agent-local branch October 29, 2026 14:50
mgravell added a commit that referenced this pull request Oct 29, 2026
…nore)

- #3303: the CycleBuffer fix itself was already in v4 (recycle resets StartTrimCount); only main's second
  test, DiscardDuringWriteKeepsLeasedBytesAfterARecycledTrimmedSegment, is new here.
- #3306: .claude/* ignored except .claude/skills/, superseding v4's .claude/worktrees/ line.
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