

Cleaning git branches in 1 command - mattetti
https://blog.splice.com/cleaning-git-branches/

======
claar
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
Ah, 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"

