{"id":14155382,"url":"https://github.com/daido1976/gh-default-branch","last_synced_at":"2026-03-07T20:10:15.988Z","repository":{"id":40323697,"uuid":"417740071","full_name":"daido1976/gh-default-branch","owner":"daido1976","description":"GitHub CLI extension to show \u0026 rename the default branch.","archived":false,"fork":false,"pushed_at":"2022-12-28T12:23:23.000Z","size":31,"stargazers_count":9,"open_issues_count":2,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-08-18T08:05:16.579Z","etag":null,"topics":["gh-extension"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/daido1976.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}},"created_at":"2021-10-16T06:30:03.000Z","updated_at":"2024-08-16T17:45:55.000Z","dependencies_parsed_at":"2023-01-31T06:30:37.697Z","dependency_job_id":null,"html_url":"https://github.com/daido1976/gh-default-branch","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daido1976%2Fgh-default-branch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daido1976%2Fgh-default-branch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daido1976%2Fgh-default-branch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daido1976%2Fgh-default-branch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/daido1976","download_url":"https://codeload.github.com/daido1976/gh-default-branch/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228821405,"owners_count":17977166,"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":["gh-extension"],"created_at":"2024-08-17T08:03:00.558Z","updated_at":"2026-03-07T20:10:15.916Z","avatar_url":"https://github.com/daido1976.png","language":"Rust","funding_links":[],"categories":["gh-extension"],"sub_categories":[],"readme":"# gh-default-branch\n\nGitHub CLI extension to show \u0026 rename the default branch.\n\n`rename` subcommand was inspired by [this gist](https://gist.github.com/mislav/5ac69530acbe1b4ca909e272caabfdba).\n\n### ⚠️ Caution\n\nThe `rename` subcommand is missing some features.\n\nIf you want any of the following missing features, try to change the default branch name from the GUI.\n\nSee. https://github.com/github/renaming#renaming-existing-branches\n\n\u003e - [x] Re-target any open pull requests\n\u003e - [ ] Update any draft releases based on the branch\n\u003e - [ ] Move any branch protection rules that explicitly reference the old name\n\u003e - [ ] Update the branch used to build GitHub Pages, if applicable\n\u003e - [ ] Show a notice to repository contributors, maintainers, and admins on the repository homepage with instructions to update local copies of the repository\n\u003e - [ ] Show a notice to contributors who git push to the old branch\n\u003e - [ ] Redirect web requests for the old branch name to the new branch name\n\u003e - [ ] Return a \"Moved Permanently\" response in API requests for the old branch name\n\nAlso see. https://github.com/cli/cli/issues/1215\n\n## Installation\n\n```\n$ gh extension install daido1976/gh-default-branch\n```\n\n## Usage\n\n```sh\n# Show the default branch\n$ gh default-branch show\n\n# Show just the name of the default branch (e.g. main)\n$ gh default-branch show -n # or --name-only\n\n# Rename the default branch\n$ gh default-branch rename \u003cNAME\u003e\n```\n\n## Development\n\n### Debug\n\nDebug with [gh-default-branch](https://github.com/daido1976/gh-default-branch/blob/main/gh-default-branch) script.\n\n```sh\n$ gh extension install .\n$ gh default-branch \u003cSUBCOMMAND\u003e\n```\n\n### Release\n\nThis extension is released as a [precompiled extension](https://docs.github.com/en/github-cli/github-cli/creating-github-cli-extensions#creating-a-precompiled-extension-manually).\n\n```sh\n$ git tag \u003cversion(e.g.`v0.1.0`)\u003e\n$ git push --tag\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaido1976%2Fgh-default-branch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdaido1976%2Fgh-default-branch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaido1976%2Fgh-default-branch/lists"}