twig prune¶
Clean up stale local branches that have no remote and haven't been touched recently.
Usage¶
Description¶
Identifies and deletes local branches matching all of these criteria:
- Not the current branch
- Not in
prune.protected_branches - No corresponding branch on
origin(after agit fetch -p) - Last commit is older than
prune.default_daysdays
Before deleting, twig lists all eligible branches with their last commit date and message, and asks for explicit confirmation.
If require_clean_tree = true (default), twig aborts immediately if the working tree has uncommitted changes.
Flags¶
| Flag | Description |
|---|---|
--days <n> |
Override the age threshold for this run. Branches older than n days are eligible. |
--dry-run |
List eligible branches without deleting anything. No confirmation prompt. |
--debug <branch> |
Explain why a specific branch is or is not eligible for pruning. Useful for debugging. |
--force |
Skip the confirmation prompt and delete all eligible branches immediately. |