solidus
solidus copied to clipboard
Change default branch to "main"
The etymology of the name "master" for the default branch is problematic, but more than that, it's just not very descriptive.
There are a few alternatives, but as this article describes, I think "main" fits much better. It's clearer as to what the purpose of the branch is:
vs.
(even the appropriate definition of master is just the word "main", which to me is a clear indication that we should be using it instead)
I don't think this change is a huge one, and it gets us away from using problematic and unclear terminology. Hearsay on Twitter is that GitHub is considering making this change themselves, though I can't find anything official to back that up.
That being said, for those on cutting edge, this change will be breaking, so we should consider deprecating (if that's even possible?) master branch, or running both master and main branches as copies of each other until a large release like 3.0.
I think that this is an issue we should consider and fix.
GitHub is working on some updates to make this easier and painless, you can find more information here. We should probably wait for the new features by GitHub to avoid problems with the migration.
Yeah, that was my thought as well. I'm happy to adopt this new convention, but in the interest of not making extra work for ourselves we can wait until they've rolled out whatever tooling they're planning to make the transition easy/seamless.
If GitHub helps us make that transition smooth, I'm all in favor of this.
Renaming has been made possible a few months ago, and it looks pretty safe, but we should properly assess the practicality of the change.
This is the only risk that I read about:
Although file URLs are automatically redirected, raw file URLs are not redirected. GitHub does not perform any redirects if users perform a git pull for the previous branch name.
Just as a heads up: Rails changed their master
branch to main
back in February, and as far as I can tell it hasn't caused too much in the way of issues for developers. At least, I haven't heard any complaints since - TBH I wasn't even aware it changed until I looked just now.
Yeah, it's been pretty painless in my experience. I've seen a few projects switch to that new default now.
I agree... and even if it could cause some small problem, I think that inclusivity is more important
I think the only annoying thing is we may need to update all the Gemfiles in contrib to use "main" as the default branch. It's currently hardcoded to "master".
Might need to update build matrixes too.