Created
November 30, 2020 06:34
-
-
Save taisyo7333/bfe6886035c62cd722a8a2fe67847ecd to your computer and use it in GitHub Desktop.
Remove topic branches except master and current 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 | |
git branch | grep -v "\\*" | grep -v master | xargs git branch -d | |
# if you would like to remove branches forcely , you can do this like below. | |
# git branch | grep -v "\\*" | grep -v master | xargs git branch -d |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment