Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for i in */; do
- if [ -d ./$i.git ]; then
- cd ./$i
- echo "About to prune branches of $i..."
- git fetch && git remote prune origin && git branch --merged origin/master | grep -v 'master$' | xargs git branch -D
- echo "Finished trying to prune branches of $i!"
- echo " "
- cd ..
- fi
- done
- echo "Branch pruning complete!"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement