feat: add Git worktree compatibility (PR #478)
Adds comprehensive Git worktree support for beads issue tracking: Core changes: - New internal/git/gitdir.go package for worktree detection - GetGitDir() returns proper .git location (main repo, not worktree) - Updated all hooks to use git.GetGitDir() instead of local helper - BeadsDir() now prioritizes main repository's .beads directory Features: - Hooks auto-install in main repo when run from worktree - Shared .beads directory across all worktrees - Config option no-install-hooks to disable auto-install - New bd worktree subcommand for diagnostics Documentation: - New docs/WORKTREES.md with setup instructions - Updated CHANGELOG.md and AGENT_INSTRUCTIONS.md Testing: - Updated tests to use exported git.GetGitDir() - Added worktree detection tests Co-authored-by: Claude <noreply@anthropic.com> Closes: #478
This commit is contained in:
16
README.md
16
README.md
@@ -1,13 +1,11 @@
|
||||
# bd - Beads Issue Tracker 🔗
|
||||
|
||||
[](https://smithery.ai/skills?ns=steveyegge&utm_source=github&utm_medium=badge)
|
||||
|
||||
|
||||
[](https://go.dev/)
|
||||
[](https://github.com/steveyegge/beads/releases)
|
||||
[](https://www.npmjs.com/package/@beads/bd)
|
||||
[](https://github.com/steveyegge/beads/actions/workflows/ci.yml)
|
||||
[](https://goreportcard.com/report/github.com/steveyegge/beads)
|
||||
[](docs/WORKTREES.md)
|
||||
[](LICENSE)
|
||||
[](https://pypi.org/project/beads-mcp/)
|
||||
|
||||
@@ -63,6 +61,7 @@ Agents report that they enjoy working with Beads, and they will use it spontaneo
|
||||
- 🌍 **Distributed by design** - Agents on multiple machines share one logical database via git
|
||||
- 🚀 **Optional Agent Mail** - Real-time multi-agent coordination (<100ms vs 2-5s git sync, 98.5% reduction in git traffic)
|
||||
- 🔐 **Protected branch support** - Works with GitHub/GitLab protected branches via separate sync branch
|
||||
- 🌳 **Git worktree compatible** - Enhanced support for git worktrees with shared database architecture
|
||||
- 🏗️ **Extensible** - Add your own tables to the SQLite database
|
||||
- 🔍 **Multi-project isolation** - Each project gets its own database, auto-discovered by directory
|
||||
- 🌲 **Dependency trees** - Visualize full dependency graphs
|
||||
@@ -116,11 +115,6 @@ brew tap steveyegge/beads
|
||||
brew install bd
|
||||
```
|
||||
|
||||
**mise (polyglot runtime manager):**
|
||||
```bash
|
||||
mise use -g ubi:steveyegge/beads[exe=bd]
|
||||
```
|
||||
|
||||
For full, platform-specific instructions (Windows, Arch Linux, manual builds, IDE integrations, etc.) see the canonical guide in [docs/INSTALLING.md](docs/INSTALLING.md).
|
||||
|
||||
**Claude Code for Web:** See [npm-package/CLAUDE_CODE_WEB.md](npm-package/CLAUDE_CODE_WEB.md) for SessionStart hook setup.
|
||||
@@ -325,8 +319,8 @@ git push
|
||||
git pull
|
||||
# bd automatically detects JSONL is newer and imports on next command
|
||||
|
||||
bd ready # Shows issues ready to work on (with fresh data from git)
|
||||
bd list # Lists all issues, including those from other machines
|
||||
bd ready # Fresh data from git!
|
||||
bd list # Shows issues from other machines
|
||||
```
|
||||
|
||||
**Manual sync (optional):**
|
||||
@@ -336,7 +330,7 @@ bd sync # Immediately flush pending changes and import latest JSONL
|
||||
|
||||
**For zero-lag sync**, install the git hooks:
|
||||
```bash
|
||||
bd hooks install
|
||||
cd examples/git-hooks && ./install.sh
|
||||
```
|
||||
|
||||
This adds:
|
||||
|
||||
Reference in New Issue
Block a user