Skip to content

chore: ignore .claude/worktrees/ - #72

Merged
quickbeard merged 1 commit into
mainfrom
ignore-agent-worktrees
Jul 14, 2026
Merged

quickbeard merged 1 commit into
mainfrom
ignore-agent-worktrees

Conversation

@quickbeard

Copy link
Copy Markdown
Owner

Summary

Claude Code creates isolated agent git worktrees under .claude/worktrees/ (via the Agent tool's isolation: "worktree" mode). These are linked worktrees whose contents should never be committed into the parent repo, but .gitignore only ignored .worktrees, so they showed up as untracked in git status.

This adds .claude/worktrees/ to .gitignore, next to the related .worktrees entry.

No DIVERGENCES.md row: this matches the file's existing fork-added local-tooling ignores (.codex, .serena, .omo, .direnv), none of which are tracked there.

Testing

  • git check-ignore .claude/worktrees/session-diff matches the new rule; the directory no longer appears in git status.

🤖 Generated with Claude Code

Claude Code creates isolated agent git worktrees under .claude/worktrees/;
keep them out of the parent repo's git status. Matches the existing
.worktrees ignore and the other local tooling ignores (.codex, .serena).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@quickbeard
quickbeard merged commit 3012acd into main Jul 14, 2026
4 of 5 checks passed
@quickbeard
quickbeard deleted the ignore-agent-worktrees branch July 14, 2026 04:27
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