You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As a part of a broad effort to avoid insensitive terminology in our software, we are renaming our default branch from master to main. We recognize that this is only a small step, but it is an opportunity to make our project and community more welcoming to historically marginalized communities.
How does this impact my development process?
There should be very little impact. GitHub will surface the branch name change in your fork, if you have one. For new forks, you will automatically have main as the default branch.
We encourage the use of feature branches for local development. The only change in practice is changing which branch your feature branch is started from. When sending Pull Requests on GitHub, the target will default to our main branch, so there are no changes to make there.
I have a lot of tools that depend on master being the upstream branch name. How can I fix that?
master has always been only a default value and a number of projects have used other names for their primary development branch for years. We encourage updating your tooling to instead dynamically determine the branch to use. This article provides insight into how you can do that. Additionally, you can always set up a branch locally of any name to track our main branch.
I'd like to do this for my own projects, do you have any documentation on how this works?
If you're a Facebook employee looking to do this for a project you maintain, please reach out to the Open Source Team.
Reacted by Brent Vatne, Lorenzo Sciandra, João Victor, Agastya Darma, Chris Bobbe, Luis Canario, Bartosz Kaszubowski, Michał Pierzchała, Shreyas Minocha, Samer Alabi and 1 more
Reacted by Motruk Dmytro, AJ Otto, pietro909, Raviraj, Carlos Mesquita, Amal Karunarathna, hehe, Alexander Mashchenko and Fábio Henriques
Reacted by Gijs Weterings, William Torres and João Victor
Are there references in the React Native CLI or releases repo that might need to get updated? Both have scripts that might references the main branch of React Native
Another tip: if you replace "master" in any URL with "HEAD", github will redirect properly, even if you change to something other than "main" now or in the future.
Reacted by Brent Vatne, Lorenzo Sciandra, João Victor and Shreyas Minocha
Another tip: if you replace "master" in any URL with "HEAD", github will redirect properly, even if you change to something other than "main" now or in the future.
Thanks, @ljharb! I will definitely make use of your suggestion for any URLs.
The bot that syncs code between Facebook's internal repository and GitHub has been paused until all configuration changes have been landed. Then I will re-enable the bot and we'll see what needs attention after that.
Actually, contributors will want to just go into the GitHub settings of their fork and rename master to main. Then navigate to your fork and you'll see the commands to run locally to update your fork checkout.
Do You have a study which proves that "master" vs "main" is an actual problem and not a made up one?
Also, don't You think that maybe fixing some of thousands of bugs RN has would make it more friendly for new people? Like for example right now RN does not even run in new Xcode :D
This change reflects the React Native team's commitment to a respectful and welcoming project for everyone, including underrepresented groups. It is also aligned with changes happening in the Git ecosystem.
I do acknowledge that we have quite a backlog to work through, and we have plans to make progress there in the coming months. If you are still running into trouble with Xcode 12.5, please take a look at and chime in on #31480.
Activity
yungsters commentedon Jun 29, 2021
I'll be updating this comment with a list of existing references to
masterin the React Native repository.Additionally, internal Facebook automation tooling will need to be updated.
yungsters commentedon Jun 29, 2021
Here are Facebook repositories specific to React Native that we will also eventually update.
elicwhite commentedon Jun 29, 2021
Are there references in the React Native CLI or releases repo that might need to get updated? Both have scripts that might references the main branch of React Native
ljharb commentedon Jun 29, 2021
Another tip: if you replace "master" in any URL with "HEAD", github will redirect properly, even if you change to something other than "main" now or in the future.
yungsters commentedon Jun 29, 2021
Thanks, @ljharb! I will definitely make use of your suggestion for any URLs.
yungsters commentedon Jul 15, 2021
This is now in progress. The
masterbranch has been renamed tomain.Contributors will probably want to update local clones following the steps documented here: https://docs.github.com/en/github/administering-a-repository/managing-branches-in-your-repository/renaming-a-branch#updating-a-local-clone-after-a-branch-name-changesThe bot that syncs code between Facebook's internal repository and GitHub has been paused until all configuration changes have been landed. Then I will re-enable the bot and we'll see what needs attention after that.
yungsters commentedon Jul 15, 2021
Actually, contributors will want to just go into the GitHub settings of their fork and rename
mastertomain. Then navigate to your fork and you'll see the commands to run locally to update your fork checkout.yungsters commentedon Jul 15, 2021
Go to: https://github.com/{{YOUR-USERNAME}}/react-native/settings/branches
NullPainter2 commentedon Jul 22, 2021
Do You have a study which proves that "master" vs "main" is an actual problem and not a made up one?
Also, don't You think that maybe fixing some of thousands of bugs RN has would make it more friendly for new people? Like for example right now RN does not even run in new Xcode :D
yungsters commentedon Jul 22, 2021
This change reflects the React Native team's commitment to a respectful and welcoming project for everyone, including underrepresented groups. It is also aligned with changes happening in the Git ecosystem.
I do acknowledge that we have quite a backlog to work through, and we have plans to make progress there in the coming months. If you are still running into trouble with Xcode 12.5, please take a look at and chime in on #31480.
yungsters commentedon Jul 22, 2021
Closing this PR because the branch rename was completed last week.
NullPainter2 commentedon Jul 23, 2021