• Deebster@programming.dev
    link
    fedilink
    arrow-up
    11
    arrow-down
    1
    ·
    6 months ago
    function delete-branches() {
      git branch |
        grep --invert-match '\*' |
        cut -c 3- |
        fzf --multi --preview="git log {} --" |
        xargs --no-run-if-empty git branch --delete --force
    }
    

    This is really slick.