In August, GitHub announced that it would change the “master” branch name for all new repositories created on the platform to “main” starting October 1. The date is less than two weeks away, and WordPress developers need to be prepared for the change if they use the service for version control or project management.
The larger tech and web development community began conversations through various venues in June, a time in which the Black Lives Matter was gaining more traction in the U.S. and worldwide. The discussion centered on removing any terminology that could be discriminatory or oppressive to specific groups of people. This ongoing discussion has shown that there is a deep division over whether such changes are necessary or even helpful.
The WordPress community is dealing with this division itself. Aaron Jorbin proposed a change at the same time to rename the default branch name on WordPress-owned repositories. Through discussion on his post and elsewhere, the community landed on “trunk,” which keeps WordPress projects in line with its SVN roots.
“To close the circle on this, a decision was made in June and earlier today (August 19),” wrote Helen Hou-Sandí, a lead WordPress developer, in the comments of the original proposal. “I updated the default branch name for new GitHub repositories under the WordPress organization to be trunk after GitHub enabled early access to that feature.”
As evidenced by the comments on the Tavern’s coverage of the proposal and those on the original post, the WordPress development community as a whole did not support this decision.
Jorbin has updated several of WordPress’s repositories and switched them to use
trunk instead of
master. However, there are still some lingering projects yet to be updated, including the primary WordPress and WordPress Develop repositories. He left a comment with an updated list in June. There is no public word on whether the existing, leftover projects will be changed.
WordPress Developer Preparations
GitHub is merely changing the default branch name for new repositories starting on October 1. This change does not affect existing repositories. Individual users, organization owners, and enterprise administrators can customize the default branch via their account settings now before the switch is made. Owners can also change the default branch name for individual repositories.
The biggest thing that developers need to watch out for is their tooling or other integrations that might still require the master branch. There may be cases where an alternative default branch name will break workflows. If planning to use a different branch name, the best thing to do right now is to spin up the tools you use on a test repository. If something breaks, check to see whether the particular tool you are using will be getting an update. In most cases, this should not be a problem because customized default branch names will be an industry standard.
The great thing about how GitHub is rolling out this feature is that it offers a choice. Those who believe that “master” is oppressive can change the branch name to something they feel is more inclusive. For those who believe otherwise, they can keep their master branch. But, everyone can use the branch name they prefer.
For existing repositories, GitHub is asking that developers be patient for now. The company is investing in tools to make this a seamless experience later this year. There are a few technical hurdles to clear first.
Developers should read the full GitHub guide on setting the default branch for more information.