-
-
Save dpmex4527/651492833781bc706d4dca8fa7c45299 to your computer and use it in GitHub Desktop.
This gist will create a custom git script that will delete any branches that are fully merged into the currently checked out branch (usually run on master)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mkdir -p ~/scripts/git | |
echo 'git branch --merged | grep -v "\*\|master" | xargs -n 1 git branch -d' > ~/scripts/git/git-bomb | |
echo 'git remote prune origin' >> ~/scripts/git/git-bomb | |
chmod +x ~/scripts/git/git-bomb | |
sudo ln -s ~/scripts/git/git-bomb /usr/bin/git-bomb |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment