Similar to other community efforts, we are exploring the impact of renaming
master branches to
main. This addresses one aspect of the use terms that may present barriers to participation. We want to create a welcoming environment that unholds the value of all community members.
We are building on work done by the Samvera Community in the Samvera Branch Renaming Working Group to identify challenges and approaches for the renaming process.
Reference: Renaming the default branch from master (official GitHub documentation)
Considerations before renaming:
You will want to contact all contributors to notify them that the change will occur. There are steps they will need to take to update their local clones (required) or forks (optional).
At this writing, there isn't a good way to prevent users from recreating the master branch. GitHub suggested a workaround that involved creating a master branch with no history or files, but doing so prevented the auto-forwarding of URLs with master branch as the path to the same URL with main branch as the path. This can break links in Issues, PRs, wikis, and documentation. It is recommended that the master branch not be re-used to allow the auto-forwarding to work. If you have a lot of contributors, you may want to consider whether this will pose a risk to your repo. A request has been made to GitHub to support blocking of branch names using branch rules. The request is pending at the time of this writing.
Change the name in GitHub:
navigate to the repo being renamed in GitHub
click branches dropdown and select
View all branchesat the bottom of the dropdown
- click pencil icon beside
- set name to
Update localhost clones:
Impact on forks:
- When visiting the fork repo in GitHub, a message is displayed that indicates the `master` branch in the fork is up to date with the `main` branch in the source repo. `This branch is even with _SOURCE_REPO_:main.`
- When a PR is created in the fork, the `master` branch in the fork will automatically be set to merge into the `main` branch in the source repo. The user would have to take action to change this.
- Forks can rename their `master` branch to `main` following the same procedure.
- You may want to notify fork developer of the rename so they understand the change has occurred and the impact on their work.
These are the initial set of repositories identified for renaming. Please check off the repository when the rename is complete.
- LD4P/blacklight-cornell — cannot change until https://github.com/cul-it/blacklight-cornell changes
- LD4P/w3id.org — cannot change until https://github.com/perma-id/w3id.org changes
Remaining repos to rename: