Branch Cleanup
Branch Cleanup
Active + Optional Keys
Make Git branch deletion opt-in through layered, explicit selection filters.
Command
[tool.custy.cli.cleanup.branch]Category
Cleanup Configuration
Quick Command
[tool.custy.cli.cleanup.branch]Properties
Properties
| Property | Type | Description | Default | Required |
|---|---|---|---|---|
include_prefixes | String array | Only branches starting with a configured prefix can advance to later filters. Empty selects none. | [] | No |
merge_status | merged | unmerged | all | Restrict eligible branches by integration state. | merged | No |
max_age | Duration | Optional active relative cutoff such as 30d, 2w, 6mo, or 1y. Commented out in the generated file. | unset | No |
before | YYYY-MM-DD | Optional active absolute latest-commit cutoff. Commented out in the generated file. | unset | No |
Narrow policy
toml[tool.custy.cli.cleanup.branch]
include_prefixes = ["release/", "feature/"]
merge_status = "merged"
max_age = "30d"
# Use before instead of max_age, never both.
# before = "2026-07-01"Protected Branches
The active cleanup workflow protects important branches such as main,
master, and develop, even when other filters match. Protection is a final
safety layer, not a replacement for careful prefix selection.