{"id":18864885,"url":"https://github.com/rshipp/default-branch","last_synced_at":"2026-05-03T05:36:09.638Z","repository":{"id":145368487,"uuid":"272304129","full_name":"rshipp/default-branch","owner":"rshipp","description":"Change the default branch for all your GitHub repos at once.","archived":false,"fork":false,"pushed_at":"2020-06-15T00:10:39.000Z","size":1,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-02-12T22:57:50.515Z","etag":null,"topics":["default-branch","github","github-api"],"latest_commit_sha":null,"homepage":"","language":"Python","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/rshipp.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":"2020-06-15T00:02:24.000Z","updated_at":"2022-09-13T14:50:00.000Z","dependencies_parsed_at":"2023-07-15T20:45:10.714Z","dependency_job_id":null,"html_url":"https://github.com/rshipp/default-branch","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rshipp%2Fdefault-branch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rshipp%2Fdefault-branch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rshipp%2Fdefault-branch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rshipp%2Fdefault-branch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rshipp","download_url":"https://codeload.github.com/rshipp/default-branch/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239808522,"owners_count":19700451,"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":["default-branch","github","github-api"],"created_at":"2024-11-08T04:44:21.007Z","updated_at":"2026-02-11T15:30:17.319Z","avatar_url":"https://github.com/rshipp.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"Bulk-change the default branch for all your GitHub repos at once, from `master` to `main` (or another new default you choose).\n\nUsage:\n\n    pip3 install -r requirements.txt\n    python3 run.py GITHUB_OWNER GITHUB_TOKEN [NEW_DEFAULT_BRANCH=main]\n\n`GITHUB_OWNER` is your username, unless you want to change repos under an organization (in which case you should use the org name).\n\nGet a token from [your account settings](https://github.com/settings/tokens). Make sure it has full repo permissions.\n\nBy default, the script ignores:\n\n* Forks\n* Archived repositories\n* Repos where the default branch is already non-standard (e.g. `development`).\n* Repos ending in `.github.io`, because GitHub Pages has hardcoded branch names.\n\nSide effects:\n\n* Existing clones will need to be updated, with `git fetch \u0026\u0026 git checkout NEW_DEFAULT_BRANCH`.\n* Open pull requests to the old branch will be closed.\n* Branch protection rules, CIs, and other systems that exclicitly reference the old branch by name may need to be updated seperately.\n* You may get @dependabot PRs on repos that haven't been updated recently and have outdated pinned dependencies.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frshipp%2Fdefault-branch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frshipp%2Fdefault-branch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frshipp%2Fdefault-branch/lists"}