branch_hygiene
Identifies stale, unmerged, or abandoned branches with ahead/behind counts, last commit date, and author to help clean up your repository.
Instructions
Read-only. Inventory of branches with ahead/behind counts versus the default branch, last commit date and author, merged status, and a stale flag (no commits in stale_days days). Use it to find unmerged, abandoned branches. The default branch itself is excluded from the list. Pure local git; no network. Returns { count, branches, default_branch_excluded }.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | Path inside the target git repo. Defaults to the server's current working directory. | |
| remote | No | Inspect remote (`origin`) branches instead of local branches. Default false. | |
| stale_days | No | A branch with no commit newer than this many days is flagged `stale`. Default 30. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| count | No | ||
| branches | No | ||
| default_branch_excluded | No |