Abstract
I wish to propose renaming the default branch from master to main. The larger developer community has been moving away from non-inclusive terms such as master, slave, blacklist, whitelist, and I wish for RubyGems & RubyGems.org to do the same.
Other examples of open source projects renaming their default branch main:
This change is relatively minimal thanks to Github natively supporting renaming the default branch to main and will do most of the work for us automatically, such as adding automatic redirects & updating existing Pull Requests to point to main. But this will require some manual steps.
You can find more information at: https://github.com/github/renaming.
Steps Required
As mentioned, Github automates most of the needed steps to switch the default branch to main, but some steps still need to be performed manually by maintainers before & after the rename.
The following list covers steps that to my knowledge are required to do, but may not be indicative of covering everything.
Github Actions
Before renaming the default branch in Github, the Github Action Workflows will need to be amended to mirror the main and master branches. So that we can test pushing a commit to main, while developers continue to use master.
Update branch protection rules
We currently use branch protection to prevent merging Pull Requests that do not pass the status checks. This rule will need to be updated to use main after the default branch changes.
Local Migration
After the rename, developers will need to migrate their local development environment to main. This migration can be done by renaming the master branch to main and updating the remote to origin/main
$ git checkout master
$ git branch -m main
$ git branch -u origin/main
Remove/Rename references to master branch
Update Github actions to remove any branch filtering on the master branch and rename any references to master in the documentation & source code.
Renaming the default branch
The default branch can be renamed in Github, which is documented in doc.github.com
Questions
-
What impacts would this change cause downstream, such as Ruby-src, Truffleruby & JRuby?
- How best do we communicate this change to maintainers?
-
Are any scripts/tooling affected by this proposed change?
-
Is the workflow in bundler-site affected by this proposed change?
Abstract
I wish to propose renaming the default branch from
mastertomain. The larger developer community has been moving away from non-inclusive terms such as master, slave, blacklist, whitelist, and I wish for RubyGems & RubyGems.org to do the same.Other examples of open source projects renaming their default branch main:
mastertomainrails/rails#40214This change is relatively minimal thanks to Github natively supporting renaming the default branch to
mainand will do most of the work for us automatically, such as adding automatic redirects & updating existing Pull Requests to point tomain. But this will require some manual steps.You can find more information at: https://github.com/github/renaming.
Steps Required
As mentioned, Github automates most of the needed steps to switch the default branch to
main, but some steps still need to be performed manually by maintainers before & after the rename.The following list covers steps that to my knowledge are required to do, but may not be indicative of covering everything.
Github Actions
Before renaming the default branch in Github, the Github Action Workflows will need to be amended to mirror the
mainandmasterbranches. So that we can test pushing a commit tomain, while developers continue to usemaster.Update branch protection rules
We currently use branch protection to prevent merging Pull Requests that do not pass the status checks. This rule will need to be updated to use
mainafter the default branch changes.Local Migration
After the rename, developers will need to migrate their local development environment to
main. This migration can be done by renaming themasterbranch tomainand updating the remote toorigin/mainRemove/Rename references to master branch
Update Github actions to remove any branch filtering on the
masterbranch and rename any references tomasterin the documentation & source code.Renaming the default branch
The default branch can be renamed in Github, which is documented in doc.github.com
Questions
What impacts would this change cause downstream, such as Ruby-src, Truffleruby & JRuby?
Are any scripts/tooling affected by this proposed change?
Is the workflow in bundler-site affected by this proposed change?