git-cleaner
TypeScript icon, indicating that this package has built-in type declarations

1.0.7 • Public • Published

git-cleaner

Build CI Version License

✂️ CLI utility for bulk cleanup of branches and tags

Why?

Sooner or later, a lot of unnecessary branches and tags can accumulate in the project, but most UI utilities do not allow you to multi-select elements for deletion, and this is exactly the task of this utility.

Features

  • multiselect branches/tags for removal
  • multiple remote
  • filtering on select mode
  • displaying progress

Install

NPM

npm install git-cleaner -g

Yarn

yarn global add git-cleaner

Development Setup

# install dependencies 
npm install
 
# build dist files 
npm run build

Note

Before using the utility you need to sync git

# Delete local tags 
git tag -l | xargs git tag -d
 
# Fetch remote branches and tags 
git fetch

Usage

Usage: gitc [options] [command]
 
Options:
  -v, --version   output the version number
  -h, --help      display help for command
 
Commands:
  tag|t           clean tags
  branch|b        clean branches
  help [command]  display help for command

Examples

Removing branches by regexp

gitc branch feat

Removing selected branches

gitc branch

Removing tags by regexp

gitc tag 'v.*\.2\..*'

Removing selected tags

gitc tag

MIT © Igor Ognichenko

Dependents (0)

Package Sidebar

Install

npm i git-cleaner

Weekly Downloads

1

Version

1.0.7

License

MIT

Unpacked Size

356 kB

Total Files

62

Last publish

Collaborators

  • robinck