Last active
February 4, 2022 10:51
-
-
Save devxoul/72adcb880b273a36420d to your computer and use it in GitHub Desktop.
Git Prune Off: Delete merged branches.
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
#!/bin/bash | |
# https://gist.githubusercontent.com/devxoul/72adcb880b273a36420d/raw/git-pruneoff | |
# Delete merged branches. | |
git branch --merged | awk '{if($1 != "*" && ($1 != "master" || $1 != "main")) print $1}' | xargs git branch -d |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment