← Back to micro January 28, 2024 at 12:00 AM Clean up merged branches I use the following to clean up merged branches from remote: Terminal windowgit 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