Created
January 31, 2013 23:00
-
-
Save Velrok/4687505 to your computer and use it in GitHub Desktop.
Removes all branches that have been already merge into master.
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
#!/usr/bin/env python | |
from sh import git | |
def main(): | |
print "before:" | |
print git('br') | |
for br in git('br', '--no-color'): | |
br = br.strip() | |
if "master" in br: continue | |
git("br", "-d", br) | |
print "now:" | |
print git('br') | |
if __name__ == '__main__': | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment