Utility to remove local git branches that have already been merged.
git brrr
Clone this repo and make sure the git-brrr
file has executable permissions.
git clone https://github.com/marionauta/git-brrr
cd git-brrr
chmod +x git-brrr
Then, move the git-brrr
file to somewhere in your PATH. That means, move it to some directory listed afer running:
echo $PATH | tr ":" "\n"
The command won't delete your default branch, if set. You can check what this value is by running:
git config init.defaultBranch
You can set custom protected branches globally or per project. Multiple branches are separated by a |
(pipe).
git config --global brrr.protectedBranches "develop"
git config brrr.protectedBranches "develop|staging" # Overrides global settings