Run
npx branch-tools
from inside a git folder.
You will then be presented with a prompt to take you through what you want to do.
If you want to speed up the command, you can install branch-tools directly:
npm i branch-tools --save-dev
npx branch-tools
Cleans unneeded local branches
Run
npx branch-tools clean
from inside a git folder.
Syncs sub repos of a repository
Run
npx branch-tools sync
from inside a folder that contains git folders.
To test this locally, clone this repo, and then run
node <path_to_package>/dist/src/bin/branch-tools.js