When working on topic branches, you often have a many old branches clogging up your local and remote repositories. This small command line tool can be run immediatley after closing a Pull Request to prune away the topic branch both locally and remotely and then bring your target branch up to date automatically before starting your new topic branch. This keeps your git repo free from clutter and ensures you always begin new branches at the point of integration - at the head of your project's target branch.
Create a branch-cleanup script in a folder. This folder should be in your path for it to be executable from the CLI.
touch ~/path/to/your/folder/new-branch