Git Command to Remove All Local Branches
Lots of tickets means lots of branches. I like to have a large clear out every now and again, and this seems to do the trick
git branch -D `git branch | grep -v ‘master’ | tr -d ‘\n’`
It will remove all local branches except master :)
Written by James O'Brien
Related protips
1 Response

good tips, however, for audiences at beginner level, use with caution
over 1 year ago
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Branch
Authors

niklongstone
42.01K

muzzlefork
11.98K
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#