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
Please follow these steps to change the default branch from master to main:
Before you start the migration add your Github user to the end of the list item to avoid overlapping efforts.
In the majority of python repositories, @googleapis/yoshi-python is listed as the code owner in .github/CODEOWNERS. If there are additional code owners listed, please reach out to the team listed to notify them about the effort.
In the “Settings” section for the Github repository, rename the default branch from master to main. If you don’t see the settings section, you will need to reach out to an admin of the repository to complete this step. Once you’re in the settings section, look for the “Default branch” section under the branches tab. For example, for python-datastream, the link to the branches tab is https://github.com/googleapis/python-datastream/settings/branches
Search the github repo for the term master in the repository. Open a PR in the repo to replace the term master with main. We have automation which will revert changes made to templated files so we also need to add replacements in owlbot.py to replace master with main similar to this PR. See this bash script that I used to create the branch for the linked PR. Note: Once this synthtool PR is merged and the synthtool templates have propagated to the repo via owlbot, we can remove the replacements in owlbot.py added in this step.
Make sure that replacements are not reverted by owlbot
Notify a Googler to complete the remaining steps at go/python-main-branch-migration.
Check the box below when the repo has been successfully migrated and verified that the continuous/nightly builds pass after the migration.
Please follow these steps to change the default branch from master to main:
masterin the repository. Open a PR in the repo to replace the termmasterwithmain. We have automation which will revert changes made to templated files so we also need to add replacements inowlbot.pyto replacemasterwithmainsimilar to this PR. See this bash script that I used to create the branch for the linked PR. Note: Once this synthtool PR is merged and the synthtool templates have propagated to the repo via owlbot, we can remove the replacements in owlbot.py added in this step.