3 ms·
Useful article for pruning merged branches, but this title is misleading and link-bait. The actual title on the blog post is "Cleaning Up Git Branches", which
by claar 12y ago
Useful article for pruning merged branches, but this title is misleading and link-bait.
The actual title on the blog post is "Cleaning Up Git Branches", which is much more appropriate for an article that uses 5 commands including potentially fragile grepping and regex's to get the job done.
- claar 12y agoAh, I see at the very bottom of the post is the "one command", in the form of an alias: alias gitpurge=" \ git checkout master && \ git remote update --prune | \ git branch -r --merged | \ grep -v master | \ sed -e 's/origin\//:/' | \ xargs git push origin"