This assumes you have installed fzf.
$ git branch --no-color | fzf -m | xargs -I {} git branch -D '{}'
Press tab
to mark a branch, shift-tab
to unmark. Press enter
and all marked branches will be deleted.
You can add custom subcommands to git. Here's how I added the above script as git boom
.
- Create a file named
git-boom
. This file should be located inside of a directory in$PATH
(either make a new directory and add it to $PATH, or use an existing location). - Add the script contents. Example from my git-boom file.
- Make the file executable.
chmod +x ./git-boom
- Now you can run
git boom
Amazing ✨ 💫 🙏