Created
August 10, 2017 16:13
-
-
Save ganey/5f3700f791a7667b0333ddb0f1bcc273 to your computer and use it in GitHub Desktop.
Git prune local branches not on remote, excluding 'master, staging , develop' - works on windows
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
#!/bin/sh | |
git branch --merged | grep -v "\*" | grep -v "master" | grep -v "develop" | grep -v "staging" | xargs -n 1 git branch -d |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment