gx nuke deletes branches thoroughly: local branch, remote tracking ref, and remote branch in one operation. It supports glob patterns for batch deletion and has safety guards to prevent accidents.
Usage
Arguments
Flags
Examples
Safety Guards
gx nuke includes several safety measures:Merged vs Unmerged
- Merged branches are deleted with
git branch -d(safe delete) - Unmerged branches are deleted with
git branch -D(force delete)
git branch --merged.
Orphan Mode
gx nuke --orphans finds all branches in the stack config whose parent no longer exists and offers to delete them in batch. This is useful after merging and deleting parent branches.
Details
Details
- Glob patterns are resolved against all local branches
- Remote deletion uses
git push origin --delete <branch> - Remote tracking refs are cleaned up with
git branch -dr origin/<branch> - After deletion, the branch is removed from the stack config
- When a branch is removed from the config, its children are also removed (they become orphaned)