Recovering interrupter with occasional relapses, lover of spreadsheets, blogger, programmer, adept debugger, conjurer of analogies, and probably other things.
I run local-branches-with-missing-remote | xargs git branch -D to remove all local branches that had remote branches, but those remote branches are gone.
So, when I merge my PR and Github deletes the branch, I can run the above command and keep my branch list nice and tidy.
I wrote
local-branches-with-missing-remote
which helps me keep my local branches tidy.I run
local-branches-with-missing-remote | xargs git branch -D
to remove all local branches that had remote branches, but those remote branches are gone.So, when I merge my PR and Github deletes the branch, I can run the above command and keep my branch list nice and tidy.
Pretty cool script!