Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Renaming master branch to main #542

Closed
Huxpro opened this issue Jun 29, 2021 · 2 comments
Closed

Renaming master branch to main #542

Huxpro opened this issue Jun 29, 2021 · 2 comments
Assignees

Comments

@Huxpro
Copy link
Contributor

Huxpro commented Jun 29, 2021

Following facebook/react-native#31788 (together with facebook/react#21767 and facebook/relay#3534, etc.), we are committing to the broad effort of avoiding biased terminologies and going to rename our default branch from master to main.

Renaming master branch to main

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?

GitHub has published a guide documenting their tooling. We recommend reading that and the accompanying documentation.

If you're a Facebook employee looking to do this for a project you maintain, please reach out to the Open Source Team.

@Huxpro Huxpro self-assigned this Jun 29, 2021
@Huxpro Huxpro pinned this issue Jun 29, 2021
@Huxpro
Copy link
Contributor Author

Huxpro commented Jul 20, 2021

Note that you have to update your local git repo setting:

git branch -m master main
git fetch origin
git branch -u origin/main main
git remote set-head origin -a

@Huxpro
Copy link
Contributor Author

Huxpro commented Jul 26, 2021

Closing this PR since the branch rename seems to be smooth. It would be stayed being pinned for while for acknowledging purpose.

@Huxpro Huxpro closed this as completed Jul 26, 2021
@tmikov tmikov unpinned this issue Nov 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant