diff --git a/internal/syncbranch/worktree.go b/internal/syncbranch/worktree.go index 7c65ce44..379829d8 100644 --- a/internal/syncbranch/worktree.go +++ b/internal/syncbranch/worktree.go @@ -726,7 +726,9 @@ func commitInWorktree(ctx context.Context, worktreePath, jsonlRelPath, message s // Stage the entire .beads directory beadsRelDir := filepath.Dir(jsonlRelPath) - addCmd := exec.CommandContext(ctx, "git", "-C", worktreePath, "add", beadsRelDir) + // Use -f (force) to add files even if they're gitignored + // In contributor mode, .beads/ is excluded in .git/info/exclude but needs to be tracked in sync branch + addCmd := exec.CommandContext(ctx, "git", "-C", worktreePath, "add", "-f", beadsRelDir) if err := addCmd.Run(); err != nil { return fmt.Errorf("git add failed in worktree: %w", err) }