Created
May 9, 2016 09:37
-
-
Save biniama/a5b36b2e0b8fd75827ee5c33a7723bc1 to your computer and use it in GitHub Desktop.
Delete all remote branches that have already been merged into master
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
git branch -r --merged | | |
grep origin | | |
grep -v '>' | | |
grep -v master | | |
xargs -L1 | | |
cut -d"/" -f2- | | |
xargs git push origin --delete | |
#Source: https://gist.github.com/schacon/942899 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment