- Save
git-del-branches.cmdsomewhere. - Add it as an alias:
git config --global alias.del-branches "!C:\\absolute\\path\\to\\git-del-branches.cmd" - Usage:
git del-branches glob*patternto delete all branches starting withgloband ending withpattern
- Save
git-del-branches.shsomewhere. - 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 withgloband ending withpattern(quotes necessary otherwise glob is expanded by shell instead of git)