facebook-android-sdk icon indicating copy to clipboard operation
facebook-android-sdk copied to clipboard

The default branch has been renamed from "master" to "main"

Open jingping2015 opened this issue 5 years ago • 2 comments

Renaming master branch to main

As a part of a broad effort to avoid problematic 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.

How can I update my local clone?

You can run the following:

git branch --move master main
git fetch origin
git branch --set-upstream-to origin/main main
git remote set-head origin --auto

jingping2015 avatar Sep 16 '21 22:09 jingping2015

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar Jan 07 '22 05:01 github-actions[bot]

Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information.

github-actions[bot] avatar Jan 14 '22 05:01 github-actions[bot]