Last active
September 18, 2018 07:13
-
-
Save doniz/47a856a49e56e30b0e66ed5303d31556 to your computer and use it in GitHub Desktop.
delete git local branches from file
This file contains hidden or 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
# put branch list to file "git branch -l | grep some-filter-text > branch-list.txt" | |
# serve branch list from file | |
BRANCHES=$(cat branch-list.txt) | |
for BRANCH in $BRANCHES; do | |
git branch -d $BRANCH -f; | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment