Skip to main content

Requirements

Requirements

Advanced

Understand the prerequisites before removing obsolete Git branches.

Commandcusty cleanup branches

Category

Maintenance

Quick Command

custy cleanup branches

cleanupbranchrequirements

Overview

Branch Cleanup operates directly on your project's Git repository.

Before running the command, ensure that your repository and project configuration are ready for branch maintenance.



Prerequisites

Required Environment

Git Repository

Required
Branch Cleanup requires the current directory to be a valid Git repository.

Project Configuration

Required
Cleanup behavior is resolved from your project'sconfig.toml.

Configured Cleanup Rules

Required
Configure branch prefixes and optional filters before attempting branch cleanup.

Repository Access

Required
Custy must be able to inspect and remove local Git branches.

Recommended Preparation

Before running Branch Cleanup:

  • Review the configured branch prefixes.
  • Verify which branches are expected to match.
  • Confirm that obsolete branches are no longer needed.
  • Review merge status and branch age filters.

These checks help ensure that only the intended branches become eligible for cleanup.



Protected Branches

Custy always protects important branches.

By default, the following branches are never removed:

  • main
  • master
  • develop

These protections apply even if a branch matches the configured cleanup filters.


What Is Not Required?

Branch Cleanup does not require:

  • staged changes,
  • commits waiting to be pushed,
  • release tags,
  • workflow execution.

The command focuses exclusively on evaluating and removing eligible local Git branches.


What's Next?

Continue to the Syntax page to learn how to execute Branch Cleanup directly or as an individual workflow stage.