https://github.com/robinck/git-cleaner
:scissors: CLI utility for bulk cleanup of branches and tags πΊπ¦
https://github.com/robinck/git-cleaner
Last synced: over 1 year ago
JSON representation
:scissors: CLI utility for bulk cleanup of branches and tags πΊπ¦
- Host: GitHub
- URL: https://github.com/robinck/git-cleaner
- Owner: RobinCK
- License: mit
- Created: 2020-08-19T16:11:45.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2022-12-07T16:31:32.000Z (over 3 years ago)
- Last Synced: 2025-03-14T15:26:03.077Z (over 1 year ago)
- Language: TypeScript
- Homepage:
- Size: 1020 KB
- Stars: 8
- Watchers: 2
- Forks: 0
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# git-cleaner

[](https://www.npmjs.com/package/git-cleaner)
[](https://github.com/RobinCK/git-cleaner/blob/master/LICENSE)
:scissors: 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
```bash
npm install git-cleaner -g
```
#### Yarn
```bash
yarn global add git-cleaner
```
## Development Setup
```bash
# install dependencies
npm install
# build dist files
npm run build
```
## Note
Before using the utility you need to sync git
```bash
# Delete local tags
git tag -l | xargs git tag -d
# Fetch remote branches and tags
git fetch
```
## Usage
```bash
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
```shell script
gitc branch feat
```

#### Removing selected branches
```shell script
gitc branch
```

#### Removing tags by regexp
```shell script
gitc tag 'v.*\.2\..*'
```

#### Removing selected tags
```shell script
gitc tag
```

MIT Β© [Igor Ognichenko](https://github.com/RobinCK)