Rename "master" branch to "main"?

Mike Frysinger vapier@gentoo.org
Thu Jan 14 09:21:56 GMT 2021


On 30 Jun 2020 14:10, Carlos O'Donell via Libc-alpha wrote:
> As we approach the release boundary for 2.32 we come to a natural point
> where we can rename our development and release branch.
> 
> My proposal would be to rename the development and current release branch:
> 
> * master -> main

this seems to have stalled.  we should do this!

i don't think we need to wait on git itself.  even before 2020, many
projects used names other than "master" for branches as their default.
but now as we start 2021, the number of projects that have migrated
has gone up quite a lot, and with GH making it well known to many
people, i think that addresses the "it's confusing" angle.

wrt compatibility, i played around with things a little on my own
server, and it seems that someone with shell access could set up a
redirect:
	$ cat refs/heads/master
	ref: refs/heads/main
pushing to master in this situation will update main.  that should
be a fairly easy way to not break existing checkouts but allowing
the default to switch to "main".  if we consider the number of devs
with write access is low, we can block pushes to "master" and they
would be forced to migrate.  then once people are eased in to the
new state, we can either delete master or freeze it.  either way,
anyone actively pulling from the repo should notice quickly.

bonus points: "main" is shorter to type than "master", and it's
mostly the same amount of tab completion.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Digital signature
URL: <https://sourceware.org/pipermail/libc-alpha/attachments/20210114/c0700388/attachment.sig>


More information about the Libc-alpha mailing list