Created
February 10, 2018 17:45
-
-
Save linkesch/a16c654ec2c46e3a0650ad4b0d9cfe3c to your computer and use it in GitHub Desktop.
Git tip: Have a lot of old branches on your machine? Here's a Bash script that removes local branches that are no longer remote: https://twitter.com/housecor/status/961942463006027776
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 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