Examples
Examples
Learn how to remove obsolete Git branches using common Branch Cleanup scenarios.
custy cleanup branchesCategory
Quick Command
custy cleanup branchesOverview
The following examples demonstrate common ways to execute Branch Cleanup.
Remember that the actual branches selected for cleanup are determined by your project's configuration and cleanup filters.
Basic Examples
Examples
Practical command examples.
Cleanup Using Project Configuration
Remove branches using the cleanup rules defined in config.toml.
custy cleanup branchesTemporary Configuration Overrides
Examples
Practical command examples.
Cleanup Only Release Branches
Temporarily include release branches during cleanup.
custy cleanup branches --include-prefix release/Cleanup All Matching Branches
Ignore merge status during cleanup.
custy cleanup branches --merge-status allAge Filter Examples
Examples
Practical command examples.
Branches Older Than Thirty Days
Only consider older branches.
custy cleanup branches --max-age 30dBranches Before a Specific Date
Select branches whose latest commit occurred before a fixed date.
custy cleanup branches --before 2026-07-01Global Options
Examples
Practical command examples.
Preview Branch Cleanup
Review the cleanup operation without deleting branches.
custy --dry-run cleanup branchesDebug Branch Cleanup
Run Branch Cleanup with additional diagnostic information.
custy --debug cleanup branchesWhat's Next?
Continue to the Output page to learn how Custy reports the results of a Branch Cleanup operation.