feat(reset): implement bd reset CLI command with unit tests

Implements the bd reset command for GitHub issue #479:
- CLI command with flags: --hard, --force, --backup, --dry-run, --skip-init, --verbose
- Impact summary showing issues/tombstones to be deleted
- Confirmation prompt (skippable with --force)
- Colored output for better UX
- Unit tests for reset.go and git.go
- Fix: use --force flag in git rm to handle staged files

Part of epic bd-aydr.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Steve Yegge
2025-12-13 10:00:23 +11:00
parent 0b400c754b
commit 88153f224f
5 changed files with 828 additions and 3 deletions

View File

@@ -70,8 +70,9 @@ func GitRemoveBeads(beadsDir string) error {
}
// Try to remove each file (git rm ignores non-existent files with --ignore-unmatch)
// Use --force to handle files with staged changes
for _, file := range jsonlFiles {
cmd := exec.Command("git", "rm", "--ignore-unmatch", "--quiet", file)
cmd := exec.Command("git", "rm", "--ignore-unmatch", "--quiet", "--force", file)
var stderr bytes.Buffer
cmd.Stderr = &stderr