{"id":17925943,"url":"https://github.com/shoenig/keep-branches","last_synced_at":"2026-02-09T15:04:35.951Z","repository":{"id":65771241,"uuid":"570211514","full_name":"shoenig/keep-branches","owner":"shoenig","description":"Prune local git repository of unwanted branches","archived":false,"fork":false,"pushed_at":"2024-08-25T12:07:12.000Z","size":44,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-24T03:34:51.325Z","etag":null,"topics":["branch","feature-branch","git","prune","repository"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shoenig.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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-11-24T15:40:17.000Z","updated_at":"2024-08-25T12:07:15.000Z","dependencies_parsed_at":"2024-06-20T21:50:54.520Z","dependency_job_id":"4b298f70-dfa8-4451-98cf-6962e9f30433","html_url":"https://github.com/shoenig/keep-branches","commit_stats":{"total_commits":8,"total_committers":1,"mean_commits":8.0,"dds":0.0,"last_synced_commit":"03b2c24063cdddd2bcaf7f5f49ee4d5675af6222"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/shoenig/keep-branches","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shoenig%2Fkeep-branches","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shoenig%2Fkeep-branches/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shoenig%2Fkeep-branches/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shoenig%2Fkeep-branches/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shoenig","download_url":"https://codeload.github.com/shoenig/keep-branches/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shoenig%2Fkeep-branches/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267503705,"owners_count":24098333,"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","status":"online","status_checked_at":"2025-07-28T02:00:09.689Z","response_time":68,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["branch","feature-branch","git","prune","repository"],"created_at":"2024-10-28T20:58:28.868Z","updated_at":"2026-02-09T15:04:30.908Z","avatar_url":"https://github.com/shoenig.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# keep-branches\n\n\u003cimg align=\"right\" width=\"240\" height=\"244\" src=\"https://i.imgur.com/dcoTPpR.png\"\u003e\n\n`keep-branches` is a CLI tool used to prune local git repository of unwanted branches.\n\nThe tool will prune branches that are\n\n- not `main`\n- not the current branch\n- not listed as an argument\n\n\n[![GitHub](https://img.shields.io/github/license/shoenig/keep-branches.svg)](LICENSE)\n\n## Install\n\nThe `keep-branches` tool is available to download from the [Releases](https://github.com/shoenig/keep-branches/releases) page.\n\nIt is pre-compiled for many operating systems and architectures including\n\n- Linux\n- Windows\n- MacOS\n- FreeBSD\n- OpenBSD\n\n## Build\n\nThe `keep-branches` command can be compiled from source using the Go tool chain.\n\nShort version:\n\n```shell\ngo install github.com/shoenig/keep-branches@latest\n```\n\n## Examples\n\nKeep only `main`\n\n```shell\nkeep-branches\n```\n\nKeep `main`, `x-my-branch`, `x-foo-branch`\n\n```shell\nkeep-branches x-my-branch x-foo-branch\n```\n\nPrint help message\n\n```shell\nkeep-branches -help\n```\n\n## Contributing\n\nThe `github.com/shoenig/keep-branches` command is always improving with new\nfeatures and bug fixes. For contributing please file an issue or pull request.\n\n## License\n\nThe `github.com/shoenig/keep-branches` command is open source under the [MPL 2.0](LICENSE) license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshoenig%2Fkeep-branches","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshoenig%2Fkeep-branches","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshoenig%2Fkeep-branches/lists"}