grov
An opinionated bare-repo-only git worktree manager.
Install
Or download a binary from Releases.
Quick start
# Clone a repo as bare and create an initial worktree
# Navigate into the worktree
# Create a new worktree for a feature branch
# List all worktrees
# Remove a worktree (and its branch)
Commands
grov init
Clones a repository as a bare repo and creates an initial worktree for the default branch. When flags are omitted, prompts interactively.
grov add <branch>
Creates a new worktree. Intelligently resolves the branch:
- Local branch exists — checks it out in a new worktree
- Remote branch exists — creates a tracking local branch
- Neither — creates a new branch from
--base(or the default branch)
grov list (alias: ls)
Lists all worktrees with status information.
# * main [clean] [↑2]
# feature-x [dirty] [↑1 ↓3]
# main
# feature-x
grov remove <name> (alias: rm)
Removes a worktree. Refuses to remove dirty worktrees unless --force is used.
grov completions <shell>
Generates shell completions.
How it works
grov enforces a sibling worktree layout with a project alias prefix:
project/ # project directory (created by grov init)
├── repo.git/ # bare repository
│ ├── .grov.toml # config (worktree prefix, etc.)
│ ├── HEAD
│ ├── config
│ └── ...
├── proj_main/ # <prefix>_<sanitized-branch>
├── proj_feature-login/ # <prefix>_<sanitized-branch>
└── proj_dev/
If the prefix is blank, worktrees are named by branch only (no prefix or underscore).
License
MIT OR Apache-2.0