Git- Script to cleanup all merged local branches
Sometimes you forget to cleanup your old branches. Here's a quick command to delete all local branches that have been merged into master:
git branch --merged master | grep -v 'master$' | xargs git branch -d
Written by Christopher Curtis
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Git
Authors
khasinski
591.1K
dmichaelavila
500.4K
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#