Contents
Background
Today, all development happens in the master branch. We want to move development to the main branch. This document tracks everything that needs to be done, and acts as a status page for the community.
Check out the ''Rename "master" branch to "main" mailing list thread on libc-alpha for background information. If you would like to contribute to the discussion, please follow up using our MailingLists.
Some excerpts:
High level plan
Rename refs/heads/master to refs/heads/main
Setup a redirect for users from refs/heads/master to refs/heads/main for roughly ~1 year
Update documentation (wiki/manual/etc...) to mention main
Send out PSA for people that main is the new name with info for how to switch
All new release branches going forward will use main instead of master (e.g. refs/heads/release/2.40/main)
Community members using master in their own namespaces should switch to main at the same time as the main glibc release
Existing branches using master will be left alone and not renamed
Work TODO
A lot of this is on the server side, so unfortunately requires an admin with access.
- [✓] Attain consensus on renaming
- [ ] Review git hooks
- [ ] Look for rules permitting/blocking non-fast-forwards, merges, deletes, etc...
[ ] refs/meta/config:project.config
- [ ] hooks-bin scripts such as email-to-bugzilla-filtered and post-receive
[ ] Rename master to main
[ ] Create a redirect for master to main
On the server, run something like: echo "ref: refs/heads/main" >refs/heads/master
This should redirect pulls & pushes to main automatically
- [ ] Update documentation for the main development branch, and policy for creating new release branches
- [ ] The source tree (manual, README, etc...)
- [ ] This wiki
- [ ] Send out PSA to the community
[ ] Add a hook to block creation of any new master branches (release or community branches)
[ ] (After 1 year) Freeze the master branch
- [ ] Write current commit to it
- [ ] Update hooks to block pushes to it
PSA
We'll need to send a PSA to the community to let them know the migration is/has happened, and how they can update their tree.
To: libc-announce@sourceware.org Subject: development branch has been renamed to "main" In our effort to make the community more inclusive, we have renamed the development branch from "master" to "main". For more details on this particular work, please see our wiki and its background section: https://sourceware.org/glibc/wiki/GlibcGit/MigrationToMain For developers with checkouts of glibc, migration is easy. You will want to rename your local branches to avoid confusion, and update the remote branches they merge from. # Rename local "master" to "main". $ git branch -M master main # Update the remote branch you pull & merge from (and push to). # You will need to repeat this for every local branch you have. $ git config branch.main.merge refs/heads/main All new clones will use "main" by default, so you won't need to make any changes there. If you have any automated scripts that have "master" hardcoded, you will need to update them to refer to "main". We do not plan on renaming any other existing (historical) branches. Moving forward, we'll use "main" instead of "master" when creating new branches (e.g. new release/2.40/main). We also will not be rewriting the git history. There is little to be gained from doing so due to how disruptive it would be for all developers involved and possibly breaking old builds, and we would rather put effort into improving the now & future of our project. Please feel free to respond to libc-alpha@sourceware.org with any questions you might have.