GitHub recently changed its behavior to use main as the default branch instead of master. We had a quick Slack discussion about this and decided it was best to rename our repositories to use main since that will quickly become the new standard to across OS projects. This is an issue to keep track of the projects that we should convert over, using a workflow that was created by the JupyterHub community.
Check that master is the default GitHub repo branch. If it's not you probably don't need to do anything :smiley:
Replace master with HEAD in all URLs pointing to a JupyterHub GitHub file or directory: https://github.com/jupyterhub/.+/(blob|tree)/master/.*
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)
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
Update references to master branches in docs
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.
There is a small but non-zero chance that trolls will put abrasive and negative comments in a PR that renames master to main. If this happens, just report their comment to GitHub and delete it. If it's somebody that has participated in an executablebooks repository before, report it to the team as a CoC violation as well.
Background
GitHub recently changed its behavior to use
main
as the default branch instead ofmaster
. We had a quick Slack discussion about this and decided it was best to rename our repositories to usemain
since that will quickly become the new standard to across OS projects. This is an issue to keep track of the projects that we should convert over, using a workflow that was created by the JupyterHub community.Workflow
This suggested workflow is based on jupyterhub/jupyterhub#3462 and https://github.com/jupyterhub/zero-to-jupyterhub-k8s/pull/2217
master
is the default GitHub repo branch. If it's not you probably don't need to do anything :smiley:master
withHEAD
in all URLs pointing to a JupyterHub GitHub file or directory:https://github.com/jupyterhub/.+/(blob|tree)/master/.*
master
withHEAD
in GitHub URLs for non-JupyterHub repos (only do this ifmaster
is the default branch, it usually is but that's not guaranteed)master
branch. If they mentionmaster
andmain
removemaster
to avoid problems if someone inadvertently pushes a newmaster
branchmaster
branches in docsActive repos with a default
master
branchObtained with https://gist.github.com/manics/6c8b88b191fae7dcf7a8a8cc5fc3cdc9 and modifying the org to be
executablebooks
.If you encounter trolls
There is a small but non-zero chance that trolls will put abrasive and negative comments in a PR that renames master to main. If this happens, just report their comment to GitHub and delete it. If it's somebody that has participated in an executablebooks repository before, report it to the team as a CoC violation as well.