{"id":15685938,"url":"https://github.com/erbridge/github-branch-renamer","last_synced_at":"2025-05-07T18:21:57.581Z","repository":{"id":39719217,"uuid":"272284987","full_name":"erbridge/github-branch-renamer","owner":"erbridge","description":"Rename the 'master' branch for an entire account at once","archived":false,"fork":false,"pushed_at":"2022-05-26T21:40:39.000Z","size":66,"stargazers_count":9,"open_issues_count":1,"forks_count":5,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-31T12:57:25.438Z","etag":null,"topics":["gbr","renaming-branches"],"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/erbridge.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-06-14T21:17:40.000Z","updated_at":"2023-03-02T05:39:48.000Z","dependencies_parsed_at":"2022-09-20T08:50:20.044Z","dependency_job_id":null,"html_url":"https://github.com/erbridge/github-branch-renamer","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erbridge%2Fgithub-branch-renamer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erbridge%2Fgithub-branch-renamer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erbridge%2Fgithub-branch-renamer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erbridge%2Fgithub-branch-renamer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/erbridge","download_url":"https://codeload.github.com/erbridge/github-branch-renamer/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252931820,"owners_count":21827172,"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":["gbr","renaming-branches"],"created_at":"2024-10-03T17:33:18.924Z","updated_at":"2025-05-07T18:21:57.552Z","avatar_url":"https://github.com/erbridge.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GitHub Branch Renamer\n\nA tool to rename the `master` branch for an entire account at once.\n\n## Installation\n\n### macOS\n\nInstall with Homebrew.\n\n```sh\nbrew install erbridge/tap/github-branch-renamer\n```\n\n### Everything else\n\nYou're on your own, I'm afraid. Refer to the [`Brewfile`](Brewfile) for clues\nabout required dependencies.\n\n## Usage\n\n```\n$ gbr\nRename the 'master' branch for an entire account at once.\n\nThis tool will find all repositories on GitHub belonging to an account that:\n\n  - aren't forks\n  - aren't archived or disabled\n  - have their default branch set to 'master'\n\nIt will then rename the master branch to 'main' by default, and set that as the\ndefault branch on GitHub instead of 'master'.\n\nBy default, the 'master' branch will be left untouched to prevent any accidental\ndata loss. If you'd like to delete those branches, set the '--delete' flag.\n\nYou must choose to either do a dry run ('--dry-run') or force the changes\n('--force'). You must also specify one of '--org' or '--user' (but not both) to\nselect the account to collect repositories from.\n\nUSAGE\n  gbr [flags]\n\nFLAGS\n  -u, --user string         The username to collect repositories in\n  -o, --org string          The organization to collect repositories in\n  -t, --team string         The team within the organization (optional)\n  -b, --new-branch string   The new name for the master branch (defaults to\n                              'main')\n  -d, --delete              Delete the master branch from GitHub\n  -n, --dry-run             Report what will happen, without making any changes\n                               on GitHub\n  -f, --force               Run for real, making changes on GitHub\n  -l, --list                Print a list of all GitHub repositories that would\n                               be changed and exit (implies a dry run)\n```\n\n## Why?\n\nThe conversation about the origin of \"master\" as a term in technology has come\nback around again recently. It's clear that Git's default branch name, `master`,\n[originated from a master-slave metaphor](https://mail.gnome.org/archives/desktop-devel-list/2019-May/msg00066.html),\nand even if it didn't, it still has that connotation for some people. We should\nrename our branches to something else to reduce the harm our language causes.\n\nRenaming branches can be a time consuming, manual process, especially if your\nrepositories are counted in the hundreds. It would be preferable to automate as\nmuch of that as possible. This tool attempts to do that.\n\nThis tool is limited to existing repositories. Until Git changes its defaults,\nnew repositories will still be created with a `master` branch. See\n[Leigh Brenecki's post](https://leigh.net.au/writing/git-init-main/) for how to\noverride that default behaviour.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferbridge%2Fgithub-branch-renamer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ferbridge%2Fgithub-branch-renamer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferbridge%2Fgithub-branch-renamer/lists"}