{"id":19313790,"url":"https://github.com/dlsrb6342/git-branchcut","last_synced_at":"2025-06-27T00:33:19.006Z","repository":{"id":64303406,"uuid":"328857026","full_name":"dlsrb6342/git-branchcut","owner":"dlsrb6342","description":"A Git branch cleanup addon, branchcut","archived":false,"fork":false,"pushed_at":"2021-02-07T14:52:51.000Z","size":27,"stargazers_count":8,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-22T16:43:09.525Z","etag":null,"topics":["git","go"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dlsrb6342.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}},"created_at":"2021-01-12T03:08:18.000Z","updated_at":"2024-10-16T15:02:52.000Z","dependencies_parsed_at":"2023-01-15T09:50:13.443Z","dependency_job_id":null,"html_url":"https://github.com/dlsrb6342/git-branchcut","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/dlsrb6342/git-branchcut","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dlsrb6342%2Fgit-branchcut","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dlsrb6342%2Fgit-branchcut/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dlsrb6342%2Fgit-branchcut/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dlsrb6342%2Fgit-branchcut/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dlsrb6342","download_url":"https://codeload.github.com/dlsrb6342/git-branchcut/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dlsrb6342%2Fgit-branchcut/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262166166,"owners_count":23268993,"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","go"],"created_at":"2024-11-10T00:41:09.141Z","updated_at":"2025-06-27T00:33:18.963Z","avatar_url":"https://github.com/dlsrb6342.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# git-branchcut\n![go](https://img.shields.io/github/go-mod/go-version/dlsrb6342/git-branchcut)\n[![Software License](https://img.shields.io/badge/License-MIT-orange.svg)](https://github.com/dlsrb6342/git-branchcut/blob/master/LICENSE)\n[![version](https://img.shields.io/github/v/release/dlsrb6342/git-branchcut)](https://github.com/dlsrb6342/git-branchcut/releases/latest)\n\n\ngit-branchcut is a git add-on for cleaning up git outdated branches with various options.\n\n### Why? \nI created this because there are too many branches stacked in my macbook. But there is no easy way to cleanup many outdated branches at once. Instead of deleting branches manually, this can be a solution.\n\n## Install\n### Homebrew\nYou can install git-branchcut via homebrew.\n\n```\nbrew tap dlsrb6342/git-branchcut https://github.com/dlsrb6342/git-branchcut\nbrew install dlsrb6342/git-branchcut\n```\n\n### Download\nAlternately, you can download executable file for your platform from [github release](https://github.com/dlsrb6342/git-branchcut/releases/latest).\n\n\n## Usage\n```\ngit branchcut help\ngit branchcut version\ngit branchcut execute [opts]\n```\n\n```\nCut branches\n\nUsage:\n  branchcut execute [flags]\n\nFlags:\n  -o, --day-offset int       Day offset. Branches that is committed before day offset would be deleted\n      --dry-run              Only print branch list that would be delete, without deleting it.\n      --force                Allow deleting the branch irrespective of its merged status.\n  -h, --help                 help for execute\n  -m, --main-branch string   Default branch name (default \"main\")\n  -p, --pattern string       Pattern for branch name\n\nGlobal Flags:\n  -g, --executable-git-path string   The git executable to use (default \"git\")\n```\nYou can cleanup branches with `day-offset` or `pattern`. If you set both two options, only branches that meet both conditions will be deleted.\n\n* `day-offset` means that branches which is committed before the days of offset would be deleted.\n  * For example, `foo` branch is commited 3 days ago and `bar` branch is commited 6 days ago. In this situation, if you set `day-offset 5`, only `bar` branch will be deleted.\n* `pattern` means Pattern for deleted branch name.\n  * For example, `feature/foo` branch is commited 3 days ago and `bugfix/bar` branch is commited 6 days ago. In this situation, if you set `pattern \"feature/*\"`, only `feature/foo` branch will be deleted.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdlsrb6342%2Fgit-branchcut","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdlsrb6342%2Fgit-branchcut","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdlsrb6342%2Fgit-branchcut/lists"}