Firstly, install the package from npm:
npm install -g swagit
Of course you can use Yarn to install it:
yarn global add swagit
Once that's done, you can run this command inside your project's directory:
swagit
# shortcut
sg
-d
Enter an interactive mode to select branches to be deleted.
MIT © Evan Ye