Created
June 25, 2012 12:05
-
-
Save fujimura/2988204 to your computer and use it in GitHub Desktop.
Delete remote branches except 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 -a | grep origin | cut -d / -f 3 | grep -v master | \ | |
ruby -e "STDIN.to_a.tap(&:shift).map(&:chomp).each {|s| p %|git push origin :#{s}| }" | |
# replace `p` with `system` to run actual command |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment