A Zsh script to clean up local and remote Git branches that have already been rebased (fully merged) onto a target branch.
Depends on branch name prefixes; for example, feature/
, bugfix/
, etc. I tend to use my username boneskull
.
- Deletes local branches matching a prefix that have been rebased onto a target branch.
- Deletes remote branches matching a prefix that have been rebased onto a target branch.