4 ms·
Cleaning git branches in 1 command
- claar 12y agoUseful 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"