Skip to main content

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]

prefix filtermerge statusage

Properties

Properties

PropertyTypeDescriptionDefaultRequired
include_prefixesString arrayOnly branches starting with a configured prefix can advance to later filters. Empty selects none.[]No
merge_statusmerged | unmerged | allRestrict eligible branches by integration state.mergedNo
max_ageDurationOptional active relative cutoff such as 30d, 2w, 6mo, or 1y. Commented out in the generated file.unsetNo
beforeYYYY-MM-DDOptional active absolute latest-commit cutoff. Commented out in the generated file.unsetNo
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.

Continue