Skip to content

Ignore Claude Code's personal files - #33

Merged
ianheggie-oaf merged 1 commit into
mainfrom
chore/gitignore-claude
Nov 10, 2026
Merged

ianheggie-oaf merged 1 commit into
mainfrom
chore/gitignore-claude

Conversation

@ianheggie-oaf

Copy link
Copy Markdown
Member

What and why

Ignores the files Claude Code keeps for one person only: private notes (CLAUDE.local.md), any .local file in .claude/ such as personal settings, temporary working copies (.claude/worktrees/) and the scheduler lock (.claude/scheduled_tasks.lock).
Anthropic's docs name the first three, while the scheduler lock is undocumented and doesn't follow the .local naming (anthropics/claude-code#61943).
Shared Claude Code files such as .claude/settings.json stay tracked.

  • The patterns keep their leading /: Claude Code writes settings.local.json at the repository root even when started in a subfolder, and the docs place CLAUDE.local.md at the root.
  • Empty .claude/.cc-writes/ folders that the sandbox leaves behind are not ignored, because git doesn't track empty folders (anthropics/claude-code#99728).

Type of change

  • Chore

How this was checked

Ran git check-ignore with global excludes turned off: CLAUDE.local.md, .claude/settings.local.json, .claude/notes.local.md, .claude/scheduled_tasks.lock and .claude/worktrees/ are ignored, while .claude/settings.json and .claude/agents/ are not.
No tracked files match the new patterns (git ls-files -ci), so nothing already committed becomes ignored.

  • Checked the affected area on my own or a staging system
  • Ran the automated tests
  • Ran /code-review (or equivalent): fixed any concerns (and rechecked), linked follow-up issues above, or noted why they are not important above
  • GitHub Actions tests: likewise fixed so they pass or linked a follow-up issue / replied why not important directly on each comment (reviewer will mark resolved as part of review)
  • Documentation updated, or not needed

Assisted-by: Claude Code:claude-opus-5-5

🤖 Generated with Claude Code

Keep each person's Claude Code settings, private notes, temporary
working copies and scheduler lock out of the repository.

See anthropics/claude-code#61943

Assisted-by: Claude Code:claude-opus-5-5
@ianheggie-oaf ianheggie-oaf self-assigned this Nov 9, 2026
@ianheggie-oaf
ianheggie-oaf marked this pull request as ready for review November 9, 2026 06:37
@ianheggie-oaf
ianheggie-oaf requested a review from a team as a code owner November 9, 2026 06:37
@ianheggie-oaf

Copy link
Copy Markdown
Member Author

Taken out of draft at Ian's command given CI tests passed and they match openaustralia/morph#1604 which was checked by Ian

Assisted-by: Claude Code:claude-opus-5-5

@ianheggie-oaf
ianheggie-oaf merged commit d88e2b6 into main Nov 10, 2026
9 checks passed
@ianheggie-oaf
ianheggie-oaf deleted the chore/gitignore-claude branch November 10, 2026 01:03
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.

2 participants