diff --git a/.beads/.gitignore b/.beads/.gitignore index 96620144..e68d2a20 100644 --- a/.beads/.gitignore +++ b/.beads/.gitignore @@ -27,8 +27,8 @@ beads.left.meta.json beads.right.jsonl beads.right.meta.json -# Keep JSONL exports and config (source of truth for git) -!issues.jsonl -!interactions.jsonl -!metadata.json -!config.json +# NOTE: Do NOT add negation patterns (e.g., !issues.jsonl) here. +# They would override fork protection in .git/info/exclude, allowing +# contributors to accidentally commit upstream issue databases. +# The JSONL files (issues.jsonl, interactions.jsonl) and config files +# are tracked by git by default since no pattern above ignores them. diff --git a/cmd/bd/doctor/gitignore.go b/cmd/bd/doctor/gitignore.go index 8b141e9d..676447d8 100644 --- a/cmd/bd/doctor/gitignore.go +++ b/cmd/bd/doctor/gitignore.go @@ -36,11 +36,11 @@ beads.left.meta.json beads.right.jsonl beads.right.meta.json -# Keep JSONL exports and config (source of truth for git) -!issues.jsonl -!interactions.jsonl -!metadata.json -!config.json +# NOTE: Do NOT add negation patterns (e.g., !issues.jsonl) here. +# They would override fork protection in .git/info/exclude, allowing +# contributors to accidentally commit upstream issue databases. +# The JSONL files (issues.jsonl, interactions.jsonl) and config files +# are tracked by git by default since no pattern above ignores them. ` // requiredPatterns are patterns that MUST be in .beads/.gitignore diff --git a/cmd/bd/init_test.go b/cmd/bd/init_test.go index 4f81122e..e3de68a1 100644 --- a/cmd/bd/init_test.go +++ b/cmd/bd/init_test.go @@ -129,7 +129,7 @@ func TestInitCommand(t *testing.T) { "beads.base.jsonl", "beads.left.jsonl", "beads.right.jsonl", - "!issues.jsonl", + "Do NOT add negation patterns", // Comment explaining fork protection } for _, pattern := range expectedPatterns { if !strings.Contains(gitignoreStr, pattern) {