Question: Changing the default branch (`master`) to `main`?

In the wake of recent events, a good part of the git-using community is converging to use main as the name for the default branch instead of master. Some related discussion:

https://twitter.com/mislav/status/1270388510684598272?s=21
https://mail.gnome.org/archives/desktop-devel-list/2019-May/msg00066.html

And github seems to be changing the default branch to main: https://twitter.com/natfriedman/status/1271253144442253312

Right now on our repo we have:

$ git grep master | wc
    122     771   13973

and most of them are references to our master branch.

This issue is for us to talk about whether or not we want to change the name of the default branch, and if yes, to what, and how.

I’m personally in favor of main, but I also understand the implications of all the scripts out there which rely on the name of the main branch. So I’d propose creating a new main branch, changing the default branch in github to main, but not delete the master branch for a good while, and have a part of the CI keep rebasing deprecated master with main.

Author: Fantashit

3 thoughts on “Question: Changing the default branch (`master`) to `main`?

  1. And github seems to be changing the default branch to main

    If so, maybe let’s wait a bit for this to happen, to avoid the situation where we renamed to main, then Github renamed to the default master to default and then we have to switch to default (or the other way around).

    Generally it would be good to have this discussion at the scientific python community level because if part of the projects rename to main, others to default and others still keep master it will be a mess for contributors.

  2. Should we have a master branch that stays in sync in main?

    I haven’t closely followed this subject but I imagine not. Having both would create confusion and likely break redirects that are enabled with that button.

Comments are closed.