Created
March 13, 2019 14:37
-
-
Save furlongm/c5a1709da01ec79e6b5b7f8fabb4780c to your computer and use it in GitHub Desktop.
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
#!/bin/bash | |
git checkout master | |
git remote prune origin | |
for b in $(git branch -v | grep "\[gone\]" | cut -d " " -f 3) ; do git branch -v -D ${b} ; done | |
git branch -d $(git branch --merged | grep -vw $(git rev-parse --abbrev-ref HEAD)) 2>/dev/null | |
git gc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment