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

Rename GitHub branches from master to main #412

Open
29 of 45 tasks
manics opened this issue May 23, 2021 · 0 comments
Open
29 of 45 tasks

Rename GitHub branches from master to main #412

manics opened this issue May 23, 2021 · 0 comments

Comments

@manics
Copy link
Member

manics commented May 23, 2021

Follow-up from #299. This suggested workflow is based on jupyterhub/jupyterhub#3462 and jupyterhub/zero-to-jupyterhub-k8s#2217

  1. Check that master is the default GitHub repo branch. If it's not you probably don't need to do anything 😃
  2. Replace master with HEAD in all URLs pointing to a JupyterHub GitHub file or directory: https://github.com/jupyterhub/.+/(blob|tree)/master/.*
  3. Optionally replace master with HEAD in GitHub URLs for non-JupyterHub repos (only do this if master is the default branch, it usually is but that's not guaranteed)
  4. Update CI workflows that reference the master branch. If they mention master and main remove master to avoid problems if someone inadvertently pushes a new master branch
  5. Update references to master branches in docs
  6. Open a PR with using this template (edit as required):
Actions to take, in order:

- [ ] approve this PR
- [ ] rename the `master` branch to `main` in GitHub (this should automatically update all PRs)
- [ ] merge this PR
- [ ] check the publish workflow publishes the expected outputs if relevant
- [ ] If readthedocs.org is used, set main as the default branch explicitly: admin -> advanced -> default branch

`$ git grep master`
# Include the above output to help reviewers. If any mentions of `master` aren't obvious add an explanation.

Active repos with a default master branch

Obtained with https://gist.github.com/manics/6c8b88b191fae7dcf7a8a8cc5fc3cdc9

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