1.0.1 • Published 5 years ago
git-branch-tools v1.0.1
Git Branch Tools
Git Branch Tools or gbt
is a CLI tool that helps streamline certain tedious housekeeping tasks around local branches. It was born out of necessity when I noticed that I would often leave local branches behind after merging them or closing them on remote
, leading to weekly "branch pruning sessions" that could eat away time that could otherwise be put to good use.
gbt
addresses some shortcomings of the git
CLI that can reduce development velocity.
Setup
yarn global add git-branch-tools@latest
or
npm install git-branch-tools -g
This depends entirely on git
, which you can install here.
Overview of commands
Command | Description |
---|---|
list-branches | Lists all the local branches + meta data about staleness |
delete [branch-name] | Deletes the given branch. |
delete-older [age] | Deletes any branch older than the specified age. See age specifiers |
Age specifiers
You can specify the age parameter of any command requiring [age]
using the format [0-9]+[dwm]
:
Specifier | Description |
---|---|
[0-9]d | Older than the specified number of days |
[0-9]w | Older than the specified number of weeks |
[0-9]m | Older than the specified number of months |