Commands
birch init
Initialize birch in the current repository. Creates a .birch/ directory with state.json for tracking worktrees, generates a default birch.config.mjs, and adds .birch/ to .gitignore.
birch init [options]
| Option | Description |
|---|---|
--local | Store worktrees in .birch/worktrees/ within the repo |
--root | Store worktrees in ~/.birch/worktrees/<repo-key>/ (default) |
birch new
Create a new worktree. Automatically initializes birch if it hasn't been set up yet.
birch new [options]
| Option | Description |
|---|---|
--name <name> | Use a custom worktree name instead of auto-generating one |
--base <branch> | Base the new branch off a specific branch (defaults to the repo's default branch) |
When no --name is provided, birch generates a memorable compound name by combining an adjective with a tree name (e.g. funky-oak, swift-cedar). There are 2,500 unique combinations.
birch list
List all tracked worktrees with their name, branch, and path.
birch list
Example output:
swift-cedar swift-cedar ~/.birch/worktrees/my-project/swift-cedar
bold-maple bold-maple ~/.birch/worktrees/my-project/bold-maple
birch go <name>
Print the absolute path to a worktree. Designed to compose with shell commands.
cd $(birch go swift-cedar)
Also updates the worktree's "last accessed" timestamp.
birch status [name]
Show git status for worktrees.
# Status for all worktrees
birch status
# Status for a specific worktree
birch status swift-cedar
Runs git status inside each worktree directory and displays the results.
birch remove <name>
Remove a worktree and clean up its state tracking entry.
birch remove <name> [options]
| Option | Description |
|---|---|
--force, -F | Skip the confirmation prompt and force-remove dirty worktrees |
By default, birch prompts for confirmation before removing. Dirty worktrees (with uncommitted changes) require --force.
birch prune
Clean up stale worktree references and merged branches.
birch prune
Prune operates in two phases:
- Stale cleanup — Removes state entries whose paths no longer exist on disk and runs
git worktree prune. - Merged branch cleanup — Detects branches that have been merged into the default branch (via regular merge or squash merge) and removes them. Skips worktrees with uncommitted changes.
birch cleanup
Remove all birch-managed worktrees and the .birch/ directory entirely. This is a destructive operation.
birch cleanup [options]
| Option | Description |
|---|---|
--confirm | Skip the confirmation prompt and proceed immediately |
Removes every tracked worktree, deletes the .birch/ directory, and removes the .birch/ entry from .gitignore.
birch help
Show usage information.
birch help
birch --help
birch -h
birch --version
Print the current version.