{"id":16265852,"url":"https://github.com/robinck/git-cleaner","last_synced_at":"2025-03-19T22:30:37.268Z","repository":{"id":42117355,"uuid":"288778694","full_name":"RobinCK/git-cleaner","owner":"RobinCK","description":":scissors: CLI utility for bulk cleanup of branches and tags 🇺🇦","archived":false,"fork":false,"pushed_at":"2022-12-07T16:31:32.000Z","size":1040,"stargazers_count":8,"open_issues_count":9,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-14T15:26:03.077Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RobinCK.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-08-19T16:11:45.000Z","updated_at":"2022-10-11T18:06:10.000Z","dependencies_parsed_at":"2023-01-24T19:03:19.323Z","dependency_job_id":null,"html_url":"https://github.com/RobinCK/git-cleaner","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RobinCK%2Fgit-cleaner","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RobinCK%2Fgit-cleaner/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RobinCK%2Fgit-cleaner/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RobinCK%2Fgit-cleaner/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RobinCK","download_url":"https://codeload.github.com/RobinCK/git-cleaner/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244515597,"owners_count":20464917,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-10T17:20:53.776Z","updated_at":"2025-03-19T22:30:36.833Z","avatar_url":"https://github.com/RobinCK.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# git-cleaner\n\n![Build CI](https://github.com/RobinCK/git-cleaner/workflows/Build%20CI/badge.svg?branch=master)\n[![Version](https://img.shields.io/npm/v/git-cleaner.svg?style=flat-square)](https://www.npmjs.com/package/git-cleaner)\n[![License](https://img.shields.io/npm/l/git-cleaner.svg?style=flat-square)](https://github.com/RobinCK/git-cleaner/blob/master/LICENSE)\n\n:scissors: CLI utility for bulk cleanup of branches and tags\n\n## Why?\n\nSooner or later, a lot of unnecessary branches and tags can accumulate\nin the project, but most UI utilities do not allow you to multi-select\nelements for deletion, and this is exactly the task of this utility.\n\n## Features\n\n- multiselect branches/tags for removal\n- multiple remote\n- filtering on select mode\n- displaying progress\n\n## Install\n\n#### NPM\n\n```bash\nnpm install git-cleaner -g\n```\n\n#### Yarn\n\n```bash\nyarn global add git-cleaner\n```\n\n## Development Setup\n\n```bash\n# install dependencies\nnpm install\n\n# build dist files\nnpm run build\n```\n\n## Note\n\nBefore using the utility you need to sync git\n\n```bash\n# Delete local tags\ngit tag -l | xargs git tag -d\n\n# Fetch remote branches and tags\ngit fetch\n```\n\n## Usage\n\n```bash\nUsage: gitc [options] [command]\n\nOptions:\n  -v, --version   output the version number\n  -h, --help      display help for command\n\nCommands:\n  tag|t           clean tags\n  branch|b        clean branches\n  help [command]  display help for command\n```\n\n## Examples\n\n#### Removing branches by regexp\n\n```shell script\ngitc branch feat\n```\n\n\u003cimg src=\"https://github.com/RobinCK/git-cleaner/raw/master/assets/gitc_branch_regexp.gif\" /\u003e\n\n#### Removing selected branches\n\n```shell script\ngitc branch\n```\n\n\u003cimg src=\"https://github.com/RobinCK/git-cleaner/raw/master/assets/gitc_branch_select.gif\" /\u003e\n\n#### Removing tags by regexp\n\n```shell script\ngitc tag 'v.*\\.2\\..*'\n```\n\n\u003cimg src=\"https://github.com/RobinCK/git-cleaner/raw/master/assets/gitc_tag_regexp.gif\" /\u003e\n\n#### Removing selected tags\n\n```shell script\ngitc tag\n```\n\n\u003cimg src=\"https://github.com/RobinCK/git-cleaner/raw/master/assets/gitc_tag_select.gif\" /\u003e\n\nMIT © [Igor Ognichenko](https://github.com/RobinCK)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobinck%2Fgit-cleaner","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frobinck%2Fgit-cleaner","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobinck%2Fgit-cleaner/lists"}