-
Notifications
You must be signed in to change notification settings - Fork 300
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
Announcement: Renaming default branch to "main" #2745
Comments
main
on 2021-05-21
main
on 2021-05-21
Removed the date from the title in case we move it again. Current plan is June 18th, 2021. |
I just realized there is an additional piece of work here that we need to track. It may pan out to just be an email to relevant folks, but need to ensure it doesn't get lost in the shuffle. @danieljurek @mitchdenny for FYI. For these repos:
We have docs samples integration set up via webhook. What happens here is that any commit to |
What is happening?
The Azure SDK Engineering System team will be renaming the default branch (currently
master
) tomain
across all of the following repositories:Some of these repositories also have private mirrors, those will also have their default branch renamed. We will use the built-in GitHub branch rename procedure and then rapidly work to address any breakages in the engineering system (preparation work has been underway for some time but we don't expect that we've found all of the potential issues).
When issues are discovered we will be prioritizing fixes as they relate to the current priority order:
The current plan is that we will perform the rename operations using GitHub's built in rename feature. This will rename the branch and repoint any PRs that are currently pointed at the
master
branch to the newmain
branch. It will also automatically introduce redirects to any links that point directly to files onmaster
.When is it happening?
We will rename the branches starting the 18th of June, 2021 (updated). The rename itself will not take long, however we expect that various elements of the engineering system will experience temporary outages as we work to address any issues resulting from the rename. Our recovery priorities are listed in the section above.
What to expect?
We will be posting awareness issues in each of the repositories that we are renaming, linking back to this issue which we will edit to contain any updated information and guidance.
What happens to my existing pull requests?
After the rename has occurred, your existing pull requests from your forks to our upstream will be updated to point to
main
instead ofmaster
(if they were targetingmaster
to begin with). When updating your existing pull requests you will continue to push to the branch you created in your fork.What happens when I submit a new pull request?
When you submit a new pull request, it will automatically point to the
main
branch as this is the new default branch in the target repositories.What happens when I need to rebase?
When you need to rebase, after the rename has occurred you will instead rebase onto the
main
branch. Because themain
branch represents the same commit history as themaster
branch the rebase will work just as it would have previously, only the name of the branch has changed.What happens when I need to switch back to the
main
branch to start new work?That Azure SDK workflow recommends that contributors work off a fork of the repository that they are contributing to and then submit pull requests back to the upstream repository from a branch other than master, then switch back to master and pull updates from upstream when starting new work. Typically this means that your local workspace has two remotes (origin and upstream). Assuming the name of the upstream repository which points to the Azure/azure-sdk-for-[lang] repository is called upstream, you can use the following commands to pull down the new main branch references:
Step 1: Rename the master branch in your fork (for each repository)
Visit
https://github.com/[your username]/azure-sdk-for-net/settings/branches
and renamemaster
tomain
.2. Alternatively, you can click on "branches" next to the branch dropdown if the popup is gone or doesn't show.
3. In the branches view, click the pencil button on the right for "master" and rename it to "main"
Step 2: Execute these commands in your local clone of your fork.
If you have any issues following these instructions please let us know ASAP so we can revise them as necessary.
What if I don't want to update my existing clones and I just want to start fresh.
You still need to rename master to main in your fork but after that you can follow the steps listed at https://azure.github.io/azure-sdk/policies_repobranching.html#clone-forked-repo to setup a new clone.
When can I submit a PR after the rename?
We would encourage you to submit PRs as soon as you are ready as part of your normal workflow. Your PRs will help us flush out any remaining issues following the rename, and getting the PR process up and running again is the top priority for the engineering systems team.
How to prepare?
There is not explicit steps you need to take with your local Git workspace prior to the rename of the repository. The section above outlines some steps that you will need to do with your local clone in order to start having the
main
branch available to create branches from.However, if you are aware of automation, configuration in the repositories that you work in that may encounter a problem as a result of the rename, please let the Azure SDK Engineering System team know by commenting on this issue or contacting us via our teams channel. We will work with you to address the issue.
The text was updated successfully, but these errors were encountered: