Skip to content

chore: ignore .claude as a symlink, not only a directory#20

Merged
jmgilman merged 1 commit into
masterfrom
chore/gitignore-claude-symlink
Jun 24, 2026
Merged

chore: ignore .claude as a symlink, not only a directory#20
jmgilman merged 1 commit into
masterfrom
chore/gitignore-claude-symlink

Conversation

@jmgilman

Copy link
Copy Markdown
Contributor

Summary

Drops the trailing slash from the .claude ignore rule (.claude/.claude).

A trailing-slash gitignore pattern matches only a real directory, so it silently missed a .claude symlink (a local convenience pointing into the committed .agents/), which left .claude showing as untracked forever despite the rule. A bare .claude matches a directory or a symlink — which is the template's actual intent: never commit local Claude state, however .claude is materialized.

This is the root-cause fix for the last stubborn ?? .claude entry (the other local tooling dirs were handled in #19). Verified in isolation: .claude/ does not match a symlink named .claude; .claude does.

Testing

.gitignore-only change; no code affected.

🤖 Generated with Claude Code

Drop the trailing slash from the `.claude` ignore rule. A trailing-slash
pattern matches only a real directory, so it missed a `.claude` symlink
(a local convenience pointing into `.agents`), leaving it perpetually
untracked. A bare `.claude` matches a directory or a symlink, which is
what the template intends — never commit local Claude state regardless of
how `.claude` is materialized.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@jmgilman jmgilman merged commit 5d120e2 into master Jun 24, 2026
7 checks passed
@jmgilman jmgilman deleted the chore/gitignore-claude-symlink branch June 24, 2026 20:39
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