Last active
February 27, 2019 14:54
-
-
Save delacruz-dev/f85d1e87a1f486ccac1ab29721668ba9 to your computer and use it in GitHub Desktop.
Removes all local branches in a git repository which are already merged or deleted from origin.
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 fetch -p && for branch in `git branch -vv --no-color | grep ': gone]' | awk '{print $1}'`; do git branch -D $branch; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment