Repository navigation
Conversation
There was a problem hiding this comment.
Copilot wasn't able to review any files in this pull request. Check if the Files changed in this pull request are included in default exclusions.
|
Update: this branch has been refreshed with the latest |
34b463c to
f3726c2
Compare
…ASP#1266) .claude/ was kept out only by a machine-local .git/info/exclude, which does not travel with a clone. Add it alongside .superpowers/ and docs/superpowers/ so a fresh clone has the protection. Verified: git check-ignore -v names .gitignore:22:.claude/ for top-level and nested paths; git ls-files -i -c --exclude-standard still returns exactly the 9 pre-existing examples/*/node_modules/*/package.json fixtures; no .claude/ file is tracked.
f3726c2 to
4257802
Compare
sonukapoor
left a comment
There was a problem hiding this comment.
Thanks for this, and the reasoning in the description is the right one: the rule belongs in the repo rather than in each person's global excludes, so nobody has to remember it.
On your branch .claude/settings.json, .claude/skills/foo/SKILL.md and a nested nested/.claude/settings.json are all ignored; on main none of them are. It does not over-reach, so .claudeignore is untouched. And nothing under .claude/ is tracked today, so no file silently drops out of the index when this lands.
One thing worth noting that makes the case stronger than the description claims: cve-lite install-skill writes into .claude/commands/, so this also stops a dogfooded run of our own command leaving untracked output that someone could commit by accident.
The one thing I want before it goes in is a test. tests/gitignore.test.ts has an it.each table of paths that must be ignored, and there is no .claude entry in it, so deleting the line you are adding leaves all 13 tests in that file green. Two strings in that array does it, and the existing entries already pair a root path with a nested one:
".claude/settings.json",
"nested/.claude/settings.json",
That turns the pattern from present into pinned, which is the whole point of putting it in the repo.
|
Thanks @sonukapoor — added both entries to the
Pinned, not just present: reverting |
What changed and why
.claude/was not in.gitignore. It was kept out only by a machine-local.git/info/exclude, which is not version-controlled and does not travel with aclone, so a fresh clone had no protection. Add
.claude/alongside the existing.superpowers/anddocs/superpowers/entries (.gitignore:22).Verification
Ignoring is confirmed against
.gitignoreitself, with machine-local excludesbypassed, so a broken pattern can't be masked:
Holds for the other paths and for a nested path:
No tracked file becomes ignored — still exactly the 9 pre-existing fixtures:
No
.claude/file is tracked:Note: the issue suggests
check-ignore --exclude-from=.gitignore, but that flagis not a
git check-ignoreoption (it belongs togit ls-files); on git 2.54 itexits 129. The
-c core.excludesfile=/dev/null check-ignore -vabove achieves thesame intent and names the matching source.
Closes #1266