Commands
>_
but clean
Remove empty branches from the workspace.
A branch is considered empty if it has no local commits, no assigned changes, and (by default) no upstream-only commits.
The entire operation is recorded as a single oplog entry, so it can
be undone with but undo.
Examples
Remove all empty branches:
Preview which branches would be removed:
Pull latest changes first, then clean:
Also remove branches that only have upstream commits:
Usage: but clean [OPTIONS]
Options
--dry-run— Preview which branches would be removed without actually deleting them--pull— Pull latest changes from the remote before cleaning--include-upstream— Also remove branches that have upstream-only commits but no local commits or changes
Last updated on