Proposal: Rename default branch to main #2893
Replies: 6 comments
-
I don't have a strong opinion either way, but I think the explanation is weird, since it insinuates that the But anyway, I don't really have any big stake in it either way. People feel better when the master branch Actually 'main' has one awkward benefit over 'master' which is that it is shorter to type. :D |
Beta Was this translation helpful? Give feedback.
-
I'm clearly on the 👍 side of the inclusive naming debate. We should try make everyone feel welcome, if language can help with that, then let's do it (by the way, in my opinion the only good example about non inclusive gem names you gave is factory_girl, which got actually renamed for this reason). But regardless of this debate, which I know it's usually long and controversial, isn't "main" a way better name than "master" for the default branch of a repository? |
Beta Was this translation helpful? Give feedback.
-
I'm ok to stick with default branch as is in git. Currently it is master, but it is marked as subject to change in the future. I wasn't able to find out any plans (I think there are none actually). It would be nice, if decision to change default branch is made, it would be done in way to not just hardcode new name everywhere. Btw. AFAIK it is still not simple to find out default branch via simple git commands :( And me personally, I would rather spend time on fixing client facing problems during my time spend on RG. If anyone has time to handle this with all consequences (not just change default branch on GitHub), I don't see any problem moving to "main" for example. |
Beta Was this translation helpful? Give feedback.
-
Yeah. If I recall correctly, the way we added this detection in |
Beta Was this translation helpful? Give feedback.
-
Could be, but I think it doesn't work for old clones. Anyway I'm not sure that's problem. |
Beta Was this translation helpful? Give feedback.
-
I've on occasion found it valuable to link people to https://www.ietf.org/archive/id/draft-knodel-terminology-07.html to help communicate why a terminology change like this is beneficial. |
Beta Was this translation helpful? Give feedback.
-
Note: This proposal is mostly taken from rubygems/rubygems#5141 but I've made some slight edits for this particular repo
Abstract
I wish to propose renaming the default branch from
master
tomain
. The larger developer community has been moving away from non-inclusive terms such as master, slave, blacklist, and whitelist.Other examples of open source projects renaming their default branch to main:
master
tomain
rails/rails#40214This 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 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.Github Actions
Before renaming the default branch in Github, the Github Action Workflows will need to be amended to mirror the
main
andmaster
branches. 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
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 themaster
branch tomain
and updating the remote toorigin/main
Remove/Rename references to master
Update Github actions to remove any branch filtering on the
master
branch and rename any references tomaster
in the documentation & source code.Update Shipit & Deploy scripts
We will need to update Shipit and any deploy scripts for staging/master to use
main
(we're applicable)Renaming the default branch
The default branch can be renamed in Github, which is documented in doc.github.com
Questions
Beta Was this translation helpful? Give feedback.
All reactions