{"id":15513155,"url":"https://github.com/frops/git_remove_branches","last_synced_at":"2026-01-22T10:04:31.125Z","repository":{"id":80591296,"uuid":"149288788","full_name":"frops/git_remove_branches","owner":"frops","description":"The script deletes interactively old branches of your git-repository","archived":false,"fork":false,"pushed_at":"2023-02-16T10:10:34.000Z","size":4,"stargazers_count":7,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-29T14:39:27.722Z","etag":null,"topics":["git","git-flow"],"latest_commit_sha":null,"homepage":"","language":"Shell","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/frops.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":"2018-09-18T12:59:43.000Z","updated_at":"2024-07-16T15:12:55.000Z","dependencies_parsed_at":null,"dependency_job_id":"fd4f2fd0-9c1d-4cae-8e4e-39bfd7d1f40a","html_url":"https://github.com/frops/git_remove_branches","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/frops/git_remove_branches","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frops%2Fgit_remove_branches","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frops%2Fgit_remove_branches/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frops%2Fgit_remove_branches/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frops%2Fgit_remove_branches/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/frops","download_url":"https://codeload.github.com/frops/git_remove_branches/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frops%2Fgit_remove_branches/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279010939,"owners_count":26084837,"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-10-12T02:00:06.719Z","response_time":53,"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":["git","git-flow"],"created_at":"2024-10-02T09:54:07.496Z","updated_at":"2025-10-12T09:32:08.950Z","avatar_url":"https://github.com/frops.png","language":"Shell","readme":"[**DEPRECATED**] Use git commands for delete merged branches instead of this code\n\n## Git commands:\nOriginal issues: https://stackoverflow.com/questions/6127328/how-do-i-delete-all-git-branches-which-have-been-merged\n\nCode:\n```\ngit branch --merged | egrep -v \"(^\\*|master|main|dev)\" | xargs git branch -d\n```\nIt delete all merged branches in the master|main|dev branches.\n\n---\n\n### Remove old branches\n\nThe script deletes old remote and local branches of your git-repository in interactive mode\n\n#### Usage\n\n##### Linux\nJust run script.sh\n~~~~\n./script.sh\n~~~~\n\nEach time a confirmation is requested to delete a branch.\nPress enter for delete branch or any symbol for cancel.\n\nYou may specify `exit` for stop script.\n\n~~~~\nBranch: origin/some_branch, Created At: 2017-05-26 Author: frops\nAre you sure to delete remote branch some_branch? [press any symbol for cancel or just enter for delete] \nexit\nExited\n~~~~\n\n##### Mac OS / Windows\nUse **Docker** and run as in Linux\n\n~~~~\ndocker run -v $(pwd):/app frops/git_remove_branches ./script.sh -m 12\n~~~~\n\n##### Params\n`-m|--month` – age of making branches in the months you want to delete\n\n`-f|--force` – the force mode, in which branches are deleted without confirmation. Please, be careful. I'am not recomended use this command. Use it in exceptional cases!\n\n##### For example\nDelete branches older then 6 month:\n~~~~\n./script.sh\n~~~~\n\nDelete branches older then 24 month (2 years):\n~~~~\n./script.sh -m 24\n~~~~\n\nDelete branches older then 6 month in **force mode**. \n\n**Please, be careful with this command.**\n~~~~\n./script.sh -f\n~~~~\n\n","funding_links":[],"categories":["Shell"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrops%2Fgit_remove_branches","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffrops%2Fgit_remove_branches","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrops%2Fgit_remove_branches/lists"}