@rename-master-branch/github-cli
v1.0.1
Published
CLI to rename the default branch on a GitHub repository
Downloads
4
Readme
github-cli
CLI to rename the default branch on a GitHub repository
Requirements
- Node 10 or newer
- You will need to create a personal access token with the
repo
scope
Usage
npx @rename-master-branch/github-cli --repo octokit/core.js --token abc4567...
Renaming the default master branch on a GitHub repository has two steps.
Find an replace "master" with "main" using a pull request
This will update things like CI configuration and badges in your README. But it might have false positives, too, so make sure you review the pull request. You can revert each change directly in the pull request review, by using the "Insert a suggestion" feature in a review comment, setting the suggestion to the original line, and directly applying it.
Rename the default "master" branch, update branch protection and pull request bases