git-clear-branch

To clear all your local branches (except master and current branch), run below at your git repo:

Usage no npm install needed!

<script type="module">
  import gitClearBranch from 'https://cdn.skypack.dev/git-clear-branch';
</script>

README

To clear all your local branches (except master and current branch), run below at your git repo:

npx git-clear-branch

Your machine must have npx installed, which is included in newest NodeJS.

In case you want to restore deleted branch, see here