chore: ignore Claude Code local files #305

Merged
nessar merged 1 commits from feature/gitignore-claude-local into develop 2026-10-19 10:44:20 +02:00
Owner

Summary

  • Ignore .agents/settings.local.json (Claude Code personal settings and permission approvals).
  • Ignore .agents/worktrees/ (temporary git worktrees Claude Code creates).

.claude is a tracked symlink to .agents/, and git does not follow symlinks when matching ignore rules. Claude Code writes .claude/settings.local.json, but git sees .agents/settings.local.json, so the rules have to name the .agents/ paths.

Shared files such as .agents/settings.json and .agents/skills/ stay trackable.

Verification

git check-ignore -v --no-index matches .agents/settings.local.json and .agents/worktrees/x/file, and does not match .agents/settings.json.

🤖 Generated with Claude Code

## Summary - Ignore `.agents/settings.local.json` (Claude Code personal settings and permission approvals). - Ignore `.agents/worktrees/` (temporary git worktrees Claude Code creates). `.claude` is a tracked symlink to `.agents/`, and git does not follow symlinks when matching ignore rules. Claude Code writes `.claude/settings.local.json`, but git sees `.agents/settings.local.json`, so the rules have to name the `.agents/` paths. Shared files such as `.agents/settings.json` and `.agents/skills/` stay trackable. ## Verification `git check-ignore -v --no-index` matches `.agents/settings.local.json` and `.agents/worktrees/x/file`, and does not match `.agents/settings.json`. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
nessar scheduled this pull request to auto merge when all checks succeed 2026-10-19 01:36:34 +02:00
nessar added 1 commit 2026-10-19 10:26:34 +02:00
chore: ignore Claude Code local files
CI / policy (pull_request) Successful in 12s
CI / validate (pull_request) Successful in 27s
CI / build (pull_request) Successful in 23s
CI / security (pull_request) Successful in 1m0s
CI / benchmark (pull_request) Successful in 1m48s
CI / test (pull_request) Successful in 1m54s
CI / images (pull_request) Successful in 55s
CI / required (pull_request) Successful in 1s
CI / policy (push) Successful in 8s
CI / validate (push) Successful in 38s
CI / build (push) Successful in 36s
CI / benchmark (push) Successful in 1m16s
CI / security (push) Successful in 56s
CI / test (push) Successful in 1m54s
CI / images (push) Successful in 52s
CI / required (push) Successful in 2s
8414c02e10
.claude is a symlink to .agents/, so Claude Code's personal settings
and temporary worktrees land under .agents/. Ignore those paths while
keeping shared settings and skills trackable.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
nessar force-pushed feature/gitignore-claude-local from ee11371f41 to 8414c02e10 2026-10-19 10:26:34 +02:00 Compare
nessar merged commit 8414c02e10 into develop 2026-10-19 10:44:20 +02:00
nessar deleted branch feature/gitignore-claude-local 2026-10-19 10:44:21 +02:00
Sign in to join this conversation.