#!/bin/bash cleanbranches(){ git fetch -p && for branch in $(git for-each-ref --format '%(refname) %(upstream:track)' refs/heads | awk '$2 == "[gone]" {sub("refs/heads/", "", $1); print $1}' ) ; do git branch -D $branch ; done } if [ "$PS1" ]; then alias k="kubectl" alias gut="cleanbranches" alias clip="wl-copy" alias grep="grep --color=auto" alias ls="ls --color=auto" alias ll="ls -la" fi