Git utility to clean up remote branches
npm install -g git-sweep
Type: String
Path to target git repository.
Type: String
Default: origin
Target remote to clean up.
Type: String
Default: origin/master
Branches to be ignored. Must be specified in <remote>/<branch>
format. Use comma to delimit multiple branches.
This option will be merged with the configuration in .gitsweepignore
.
Type: Boolean
Default: false
Run git-sweep
without actually deleting any branch. Useful for verifying the list of branches that will be deleted.
Type: String
Default: 1m
Minimum age for a branch to be considered for deletion. Format 1y2m3d
means "older than 1 year 2 months and 3 days".
Type: Boolean
git-sweep /path/to/repo
git-sweep /path/to/repo --age 1y2m3d
git-sweep /path/to/repo --ignore origin/master,origin/dev
git-sweep /path/to/repo --remote fork
git-sweep /path/to/repo --preview
A .gitsweepignore
can be added to configure the ignore
option.
When used together with --ignore
, their entries will be merged.
git-sweep
currently supports ssh-agent
only.
- Authentication methods
- username/password
- HTTPS
- github 2FA
- Manual ssh key files
- Filters
- Merged branch
- Cutoff date (similar to age)
- CLI help
- Upgrade NodeGit to v0.24.0
- Upgrade NodeGit to v0.16.0
- Fix EOL issue in OS X
- Changed
path
to be mandatory
- Fix missing auth callbacks when actual push
- Add support to authenticate using password
- Add CLI help
- Add support to authenticate using
ssh-agent
- First release