Skip to content

Instantly share code, notes, and snippets.

@hexpunk
hexpunk / delete_local_branches.sh
Created January 12, 2025 23:16 — forked from TSMMark/delete_local_branches.sh
Delete local branches that don't exist on remote/origin !USE AT YOUR OWN RISK!
git fetch --all -p; git branch -vv | grep ": gone]" | awk '{ print $1 }' | xargs -r -n 1 git branch -D