Skip to content

Instantly share code, notes, and snippets.

@dteoh
Created September 15, 2021 00:26
Show Gist options
  • Save dteoh/575c3a5a6025ac2591d2062243a4e2a3 to your computer and use it in GitHub Desktop.
Save dteoh/575c3a5a6025ac2591d2062243a4e2a3 to your computer and use it in GitHub Desktop.
Interactively delete git branches locally

Delete multiple Git branches with a UI

This assumes you have installed fzf.

$ git branch --no-color | fzf -m | xargs -I {} git branch -D '{}'

Press tab to mark a branch, shift-tab to unmark. Press enter and all marked branches will be deleted.

@Sorcy
Copy link

Sorcy commented Sep 5, 2024

For this you are a prince among men!

@mfedak-tqgg
Copy link

beautiful!

@bodinsamuel
Copy link

🫡

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment