Skip to content

Instantly share code, notes, and snippets.

View kricha's full-sized avatar
🏠
Working from home

Oleksii kricha

🏠
Working from home
View GitHub Profile
@kricha
kricha / gist:cc8d1bf0894f18c674e3b4275bb7a5bf
Created July 26, 2016 08:14
remove remote merged to master branches
arr=(master "->" HEAD);for branch in `git branch -r --merged master| grep -v "\* master"`; do branch=${branch#origin/}; if [[ " ${arr[@]} " =~ " ${branch} " ]];then echo "DO NOT DELETE ! " ${branch};else git branch -D ${branch}; fi; done