Proposal: renaming 'master' branch to 'main'

Andrea Bolognani abologna at redhat.com
Tue Jan 17 12:55:43 UTC 2023


On Tue, Jan 17, 2023 at 09:02:23AM +0100, Martin Kletzander wrote:
> On Mon, Jan 16, 2023 at 02:55:10PM +0000, Daniel P. Berrangé wrote:
> > I'd suggest it is time to libvirt to get on this train and rename our
> > default branch to 'main' in all repositories.
> >
> > There are essentially two options
> >
> >  * Rename 'master' to 'main'
> >
> >    With this, anyone pulling from an existing checkout will get an
> >    error telling them that 'master' does not exist. It won't tell
> >    them about 'main', but at least it gives them a sign that something
> >    in their checkout probably needs changing.
> >
> >    Downside is that any URLs pointing to source files / commits with
> >    a branch name in the URL will become 404s.
> >
> >  * Clone 'master' to 'main'
> >
> >    With this, anyone pulling from an existing checkout will get no
> >    updates. It is very easy for people to not realize that they are
> >    tracking a branch which is no longer used
> >
> >    Downside is also that the undesirable term 'master' remains
> >    present in the repo, even if unused. We might also miss places
> >    which still refer to 'master' which will end up outdated
>
> We can also then remove everything from master and just keep a README
> file explaining the situation.

I like this option. It removes the guesswork, while still making the
change visible in a very obvious way. We can then drop the master
branch for good after a Reasonable Amount of Time™ has passed.


At this point, most of the projects that I interact with outside of
the libvirt organization have switched away from having a "master"
branch, mostly adopting "main" as the new name. So making the change
would make things more consistent on my side, and I'm for it.

-- 
Andrea Bolognani / Red Hat / Virtualization



More information about the libvir-list mailing list