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

Switch main branch from master to main in all bundled packages #5598

Open
22 of 35 tasks
schlessera opened this issue Jan 5, 2022 · 2 comments
Open
22 of 35 tasks

Switch main branch from master to main in all bundled packages #5598

schlessera opened this issue Jan 5, 2022 · 2 comments
Assignees

Comments

@schlessera
Copy link
Member

schlessera commented Jan 5, 2022

Switch all main branches for the bundled packages from master to main.

⚠️ However, this will cause all open PRs to become invalid and immediately be closed! ⚠️

Therefore, this should be worked upon for each repo separately, while first ensuring no PRs are open against the master branch anymore.

Note: The Composer branch-alias needs to be adapted to change from dev-master to dev-main as well. Additionally, wp-cli-dev will need its composer.json file updated.

After the changes, the following commands can adapt a local repository for the same change:

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

TODO:

@danielbachhuber
Copy link
Member

danielbachhuber commented Jul 6, 2022

⚠️ However, this will cause all open PRs to become invalid and immediately be closed! ⚠️

@schlessera I believe Jetpack was able to switch the default branch name without this outcome. What makes you think this is what happen?

@danielbachhuber
Copy link
Member

danielbachhuber commented Jul 12, 2022

I believe Jetpack was able to switch the default branch name without this outcome. What makes you think this is what happen?

Following up on this Slack conversation, it appears the automatic branch renaming can unexpectedly break for some repos with very old PRs, etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants