Skip to content

Instantly share code, notes, and snippets.

@miyataka
Created April 25, 2021 05:14
Show Gist options
  • Save miyataka/b15a584655dcb883a3691493921152a7 to your computer and use it in GitHub Desktop.
Save miyataka/b15a584655dcb883a3691493921152a7 to your computer and use it in GitHub Desktop.
oneliner for bulk delete already git local branches
# check
git branch --merged | grep -v main
# bulk delete
git branch --merged | grep -v main | xargs -I{} git branch -d {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment