beads/internal/syncbranch
Andrey Taranov 1a64654c48
fix(sync): force-add .beads in worktree for contributor mode (#947)
In contributor mode (bd init --contributor), .beads/ is excluded in
.git/info/exclude to prevent committing upstream issue databases.
However, this exclusion applies to ALL worktrees, including the sync
worktree where .beads/ must be committed.

The fix adds -f flag to git add in commitInWorktree() to force-add
files even when gitignored. This follows the existing pattern in
beads where -f is used for worktree operations (git worktree add -f).

Fixes: bd sync failing with "git add failed in worktree: exit status 1"

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-07 17:40:09 -08:00
..
integrity.go fix(sync): atomic export and force-push detection (bd-3bhl, bd-4hh5) 2026-01-04 23:14:11 -08:00
integrity_test.go Add sync branch integrity guards for force-push detection (bd-hlsw.4) 2025-12-30 17:07:25 -08:00
syncbranch.go fix(sync): persist sync branch to yaml and database (GH#909) (#910) 2026-01-05 19:11:55 -08:00
syncbranch_test.go fix(sync): persist sync branch to yaml and database (GH#909) (#910) 2026-01-05 19:11:55 -08:00
worktree.go fix(sync): force-add .beads in worktree for contributor mode (#947) 2026-01-07 17:40:09 -08:00
worktree_divergence_test.go fix: use content-level merge for divergence recovery (bd-kpy) 2025-12-24 22:41:40 -08:00
worktree_helpers_test.go bd sync: 2025-12-23 23:38:57 2025-12-24 00:06:41 -08:00
worktree_path_test.go fix: edge case in normalizeBeadsRelPath for similar prefixes 2025-12-29 15:51:17 -08:00
worktree_sync_test.go refactor: Remove deprecated fetchAndRebaseInWorktree (bd-kkka) 2025-12-28 16:40:26 -08:00