mirror of
https://github.com/nushell/nu_scripts.git
synced 2024-10-26 22:08:03 +03:00
db9606af6c
This implementation prunes local branches that have been merged and optionally prunes remote branches that have been merged. The script may be configured to keep branches through local git configuration. The remote name can be autocompleted.
440 B
440 B
Git branch cleanup
Remove any local git branches that have been merged and optionally remove any remote branches that have been merged.
Load with:
source modules/git/git_branch_cleanup.nu
To remove merged branches:
git branch-cleanup
To keep merged branches that start with "releases/":
git config --local --add branch-cleanup.keep 'releases/.*'
Keep branch patterns are space-separated