Cleanup Merged branches
From this excellent post http://stevenharman.net/git-clean-delete-already-merged-branches
git branch --merged master | grep -v "\* master" | xargs -n 1 git branch -d
Or from HEAD
git branch --merged | grep -v "\*" | xargs -n 1 git branch -d
Written by Dinesh Vasudevan
Related protips
1 Response
Good comment there too. Firstly make sure you're checked into master. Or run:
git branch --merged master | grep -v "\master" | xargs -n 1 git branch -d
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#