- Save
git-del-branches.cmd
somewhere. - Add it as an alias:
git config --global alias.del-branches "!C:\\absolute\\path\\to\\git-del-branches.cmd"
- Usage:
git del-branches glob*pattern
to delete all branches starting withglob
and ending withpattern
- Save
git-del-branches.sh
somewhere. - Make it executable:
chmod a+x git-del-branches.sh
- Add it as an alias:
git config --global alias.del-branches "!/absolute/path/to/git-del-branches.sh"
- Usage:
git del-branches "glob*pattern"
to delete all branches starting withglob
and ending withpattern
(quotes necessary otherwise glob is expanded by shell instead of git)