worktree-cleanup
Remove a worktree after its branch has been merged.
Usage
bearing worktree cleanup <repo> <branch>
Arguments
| Argument | Description |
|---|---|
repo | Name of the repository |
branch | Branch name of the worktree to remove |
Example
bearing worktree cleanup myapp feature-auth
What It Does
- Removes the worktree folder (
{repo}-{branch}) - Runs
git worktree pruneto clean up git metadata - Removes the entry from
local.jsonl - Optionally updates
workflow.jsonlstatus tomerged
Notes
- Run this after your PR has been merged
- Does not delete the remote branch (do that via GitHub/GitLab)
- Safe to run even if the folder was manually deleted