Skip to content

Add .claude/ to .gitignore #58

Description

@scttbnsn

.claude/ isn't in this repo's .gitignore, and .claude/worktrees/ already exists here as an empty directory. That combination is a live fuse rather than a theoretical one.

Without the ignore entry, all of these are demonstrated behaviour, not guesses:

  • git add -A in the main checkout stages a nested worktree as an embedded gitlink — the broken-submodule shape — not as files. One careless git add -A while a worktree is populated puts it in history.
  • rg --hidden walks into another agent's in-progress worktree and duplicates every match, including anything secrets-shaped. The ignore entry suppresses it, because ripgrep respects gitignore. find never does.
  • git clean -fd and git stash -u skip a nested worktree, but git clean -ffd deletes it.

Fix is one line in .gitignore:

.claude/

I've appended it to this clone's .git/info/exclude as a local mitigation so nothing can fire today, but that's unshared and doesn't protect a second clone or another contributor. The committed line is the actual fix.

Shape file: standards/worktrees.md in codeswhat-ops, which also carries the rest of the worktree target state and this repo's measured drift.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions