Skip to content

Instantly share code, notes, and snippets.

@michealzh
Created June 23, 2020 10:18
Show Gist options
  • Save michealzh/75104c470c056b400393fdd9d80c5864 to your computer and use it in GitHub Desktop.
Save michealzh/75104c470c056b400393fdd9d80c5864 to your computer and use it in GitHub Desktop.
git delete branch except master
#ref: https://coderwall.com/p/x3jmig/remove-all-your-local-git-branches-but-keep-master
git branch | grep -v "master" | xargs git branch -D
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment