{"id":16399834,"url":"https://github.com/justinrubek/git-prune-branches","last_synced_at":"2026-04-18T07:35:12.966Z","repository":{"id":230788902,"uuid":"780172247","full_name":"justinrubek/git-prune-branches","owner":"justinrubek","description":"A command-line application that cleans local git branches from remote repositories","archived":false,"fork":false,"pushed_at":"2024-12-07T02:44:18.000Z","size":45,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-26T02:45:54.717Z","etag":null,"topics":["flake","git","gitoxide","gix","nix","nix-flake","rust"],"latest_commit_sha":null,"homepage":"","language":"Nix","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/justinrubek.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2024-03-31T22:27:52.000Z","updated_at":"2024-12-07T02:44:22.000Z","dependencies_parsed_at":"2024-04-01T00:25:03.823Z","dependency_job_id":"281791f3-8094-4b7b-af17-a250f487acc7","html_url":"https://github.com/justinrubek/git-prune-branches","commit_stats":null,"previous_names":["justinrubek/git-prune-branches"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/justinrubek/git-prune-branches","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justinrubek%2Fgit-prune-branches","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justinrubek%2Fgit-prune-branches/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justinrubek%2Fgit-prune-branches/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justinrubek%2Fgit-prune-branches/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/justinrubek","download_url":"https://codeload.github.com/justinrubek/git-prune-branches/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justinrubek%2Fgit-prune-branches/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31961347,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T00:39:45.007Z","status":"online","status_checked_at":"2026-04-18T02:00:07.018Z","response_time":103,"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":["flake","git","gitoxide","gix","nix","nix-flake","rust"],"created_at":"2024-10-11T05:25:54.169Z","updated_at":"2026-04-18T07:35:12.938Z","avatar_url":"https://github.com/justinrubek.png","language":"Nix","funding_links":[],"categories":[],"sub_categories":[],"readme":"# git-prune-branches\n\nThis is a utility that you can use to delete all local git branches that have been deleted from a remote.\nThe tool will look at the local branches that track a remote branch and delete any that are no longer present on the remote.\n\n## usage\n\n- to delete local branches that track `origin`: `git prune-branches`\n- to perform a dry run: `git prune-branches --dry-run`\n- help page: `git prune-branches -h`\n- to target a different remote: `git prune-branches --remote \u003cremote-name\u003e`\n- to target a repository in another directory: `git prune-branches --path \u003cpath-to-repo\u003e`\n\n\n## why use this\n\nThere are many different ways to delete local branches that have been deleted from a remote. \nHowever, remembering them and using them correctly can be non-trivial.\nHere is one example of how you can do this using the command line:\n`git branch -r | awk '{print $1}' | egrep -v -f /dev/fd/0 \u003c(git branch -vv | grep origin) | awk '{print $1}' | xargs git branch -D`.\nThis command is not easy to understand or remember.\nAdditionally, cross-platform compatibility can be an issue.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjustinrubek%2Fgit-prune-branches","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjustinrubek%2Fgit-prune-branches","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjustinrubek%2Fgit-prune-branches/lists"}