grov
An opinionated bare-repo-only Git worktree manager.
grov manages a predictable project layout:
- one bare repository at
repo.git - sibling working trees for branches
- optional branch-name prefixing
Install
Or download binaries from GitHub Releases.
Quick start
# Clone as bare and create the initial worktree
# Enter the initial worktree
# Create a worktree for a feature branch
# List worktrees
# Remove a worktree and delete its local branch
Command reference
grov init
Clone repository as bare, write config, and create the initial worktree.
If flags are omitted, init prompts interactively for URL, name, prefix, and branch. The --branch flag overrides the auto-detected default branch.
grov add <branch>
Create a new worktree, with branch resolution in this order:
- existing local branch
- existing remote branch (
origin/<branch>) with tracking - new local branch — prompts for base branch (defaults to the current branch)
Notes:
grov addattemptsgit fetch originfirst; fetch failures are warned and do not abort the command.- When creating a new branch without
--base, an interactive prompt asks for the base branch with the current branch as the default. - In non-interactive contexts (scripts, CI), pass
--baseexplicitly — stdin must be a terminal or the command exits with an error.
grov list (alias: grov ls)
List non-bare worktrees and their state.
# ● main ✓ clean ↑2
# ○ feature-x ✦ dirty ↑1 ↓3
# ○ stale-wt ! missing
# Compact output (branch names only)
# main
# feature-x
Status tokens:
✓ clean: no local changes✦ dirty: uncommitted changes! missing: worktree path no longer exists on disk? unknown: state could not be determined
list correctly marks the current worktree even when run from a nested subdirectory.
grov remove <name> (alias: grov rm)
Remove a worktree by name.
Flags:
--match auto|branch|dir(default:auto)--force--delete-branch
Ambiguity handling:
--match automatches by branch or directory name.- if multiple candidates match, command exits with an ambiguity error and prints rerun guidance.
grov completions <shell>
Generate shell completions.
Project layout
grov enforces a sibling worktree layout:
project/
├── repo.git/
│ ├── .grov.toml
│ ├── HEAD
│ ├── config
│ └── ...
├── proj_main/
├── proj_feature-login/
└── proj_dev/
If the prefix is blank, worktrees are named only by sanitized branch name.
Development
Common local validation:
For local dev setup with the in-development binary (grovd) in an isolated sandbox, see docs/local-dev.md (includes one-command zsh setup).
CI and release automation
CI (.github/workflows/ci.yml)
- triggers on push to
mainand pull requests - runs
fmt,clippy, andtestas separate jobs - uses Rust dependency caching and concurrency cancellation
Release (.github/workflows/release.yml)
- triggers on tag push
v* - preflight gate runs fmt/clippy/test
- publishes to crates.io
- builds release binaries for Linux and macOS targets
- uploads release artifacts and
checksums.txt - publish job uses GitHub environment
release
Project governance
- branch protection on
mainrequires checks:fmt,clippy,test - conversation resolution is required before merge
- linear history enforced (no force-push/deletion)
CODEOWNERS:.github/CODEOWNERS- Dependabot weekly updates for Cargo and GitHub Actions:
.github/dependabot.yml - PR template:
.github/pull_request_template.md - issue templates:
.github/ISSUE_TEMPLATE/
Contributing and security
- Contribution guide: CONTRIBUTING.md
- Security policy: SECURITY.md
License
MIT OR Apache-2.0