Last active
October 29, 2019 13:36
-
-
Save wteuber/e5d8a3bb3f0f2f3d145f47122cc8ab29 to your computer and use it in GitHub Desktop.
git: prune and delete gone local branches
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
#!/usr/bin/env bash | |
git remote prune origin && git branch -vv | grep 'origin/.*: gone]' | awk '{print $1}' | xargs git branch -d |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment