Remove local branches that have been deleted on remote Add the following command to [alias] section in your .gitconfig. [alias] yolo = "!f() { git remote prune origin; git branch -vv | grep 'origin/.*: gone]' | awk '{print $1}' | xargs git branch -D; }; f" Merged