Last active
November 4, 2016 02:11
-
-
Save brancusi/3598a979f841d46b68575aae50eebf02 to your computer and use it in GitHub Desktop.
Delete all local branches except masterDelete all remote branches
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
git branch | grep -v master | xargs git branch -d | |
git fetch fork --prune | |
git branch -a | grep remotes/fork | grep -v master | sed 's/remotes\/fork\///g' | xargs git push fork --delete |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment