trimr - Trim those unused git branches with ease.
Do you work in a high velocity environment where you are constantly creating new branches on your fork for all your feature contributions? Do you find you have an abundance of merged local branches you no longer use? The trimr
application aims to make clean-up of those stale branches simple.
To run the trimr program, simply give it the path to your repository:
trimr -p <repository_dir>
Trimr will then give you a prompt asking you if you want to delete a specific branch. To avoid the prompts you can supply the --no-confirm
flag.
Trimr ignores branches listed in the trimr configuration file under branches.protected
. The config command allows you to add or remove branches from the protected branches list.
You can add a branch to the protected branches list as follows:
trimr config protected-branch add -n <branch_name>
You can do something similar to remove branches:
trimr config protected-branch remove -n <branch_name>
You can download pre-built binaries from the latest release and copy them to your preferred binary directory.
To install on macOS using Homebrew:
brew tap FuzzyStatic/homebrew-tap
brew install trimr
- Ability to trim remote branches
- Per repo configuration