{"id":13991863,"url":"https://github.com/pswai/git-sweep","last_synced_at":"2025-07-13T18:31:33.673Z","repository":{"id":77195503,"uuid":"54779329","full_name":"pswai/git-sweep","owner":"pswai","description":"Clean up remote branches for git repo","archived":false,"fork":false,"pushed_at":"2019-01-28T02:20:35.000Z","size":71,"stargazers_count":10,"open_issues_count":3,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-17T03:48:19.263Z","etag":null,"topics":["git","git-sweep","maintenance"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/pswai.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2016-03-26T13:04:24.000Z","updated_at":"2022-09-24T22:39:04.000Z","dependencies_parsed_at":"2023-06-18T20:31:36.601Z","dependency_job_id":null,"html_url":"https://github.com/pswai/git-sweep","commit_stats":{"total_commits":40,"total_committers":3,"mean_commits":"13.333333333333334","dds":"0.050000000000000044","last_synced_commit":"d36d39d9c24e64e6a64be4ba31e301e069f8cdfd"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/pswai/git-sweep","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pswai%2Fgit-sweep","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pswai%2Fgit-sweep/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pswai%2Fgit-sweep/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pswai%2Fgit-sweep/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pswai","download_url":"https://codeload.github.com/pswai/git-sweep/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pswai%2Fgit-sweep/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265186677,"owners_count":23724718,"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":["git","git-sweep","maintenance"],"created_at":"2024-08-09T14:01:38.346Z","updated_at":"2025-07-13T18:31:33.413Z","avatar_url":"https://github.com/pswai.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"## git-sweep [![npm version](https://badge.fury.io/js/git-sweep.svg)](https://badge.fury.io/js/git-sweep)\n\n\u003e Git utility to clean up remote branches\n\n### Install\n\n```\nnpm install -g git-sweep\n```\n\n### Options\n\n#### path\n\nType: `String`\n\nPath to target git repository.\n\n#### remote\n\nType: `String`\n\nDefault: `origin`\n\nTarget remote to clean up.\n\n#### ignore\n\nType: `String`\n\nDefault: `origin/master`\n\nBranches to be ignored. Must be specified in `\u003cremote\u003e/\u003cbranch\u003e` format. Use comma to delimit multiple branches.\nThis option will be merged with the configuration in [`.gitsweepignore`](#config-file).\n\n#### preview\n\nType: `Boolean`\n\nDefault: `false`\n\nRun `git-sweep` without actually deleting any branch. Useful for verifying the list of branches that will be deleted.\n\n#### age\n\nType: `String`\n\nDefault: `1m`\n\nMinimum age for a branch to be considered for deletion. Format `1y2m3d` means \"older than 1 year 2 months and 3 days\".\n\n#### password\n\nType: `Boolean`\n\n### Example Usage\n\n#### Delete remote branches that are older than 1 month except `origin/master`\n\n```\ngit-sweep /path/to/repo\n```\n\n#### Delete older than 1 year, 2 month and 3 days\n\n```\ngit-sweep /path/to/repo --age 1y2m3d\n```\n\n#### Delete except `origin/master` and `origin/dev`\n\n```\ngit-sweep /path/to/repo --ignore origin/master,origin/dev\n```\n\n#### Delete from another remote\n\n```\ngit-sweep /path/to/repo --remote fork\n```\n\n#### Dry run\n\n```\ngit-sweep /path/to/repo --preview\n```\n\n### Config file\n\nA `.gitsweepignore` can be added to configure the `ignore` option.\nWhen used together with `--ignore`, their entries will be merged.\n\n### Authentication\n\n`git-sweep` currently supports `ssh-agent` only.\n\n### Roadmap\n\n- Authentication methods\n  - [x] username/password\n  - HTTPS\n  - github 2FA\n  - Manual ssh key files\n- Filters\n  - Merged branch\n  - Cutoff date (similar to age)\n- [x] CLI help\n\n### License\n\n[MIT](LICENSE)\n\n### Changelog\n\n#### v0.4.0\n\n- Upgrade NodeGit to v0.24.0\n\n#### v0.3.0\n\n- Upgrade NodeGit to v0.16.0\n\n#### v0.2.0\n\n- Fix EOL issue in OS X\n- Changed `path` to be mandatory\n\n#### v0.1.3\n\n- Fix missing auth callbacks when actual push\n\n#### v0.1.2\n\n- Add support to authenticate using password\n- Add CLI help\n\n#### v0.1.1\n\n- Add support to authenticate using `ssh-agent`\n\n#### v0.1.0\n\n- First release\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpswai%2Fgit-sweep","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpswai%2Fgit-sweep","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpswai%2Fgit-sweep/lists"}