[VOTE] Switch 'master' to 'main' branch for repositories
jonas.gorski at gmail.com
Mon Mar 6 02:36:49 PST 2023
On Mon, 27 Feb 2023 at 08:06, Felix Fietkau <nbd at nbd.name> wrote:
> Hi all,
> More and more projects are switching their repositories to use the
> 'main' branch instead of the 'master' branch. This also includes many
> Linux upstream trees as well. Some trees are even removing their
> 'master' branches already.
> I think this is becoming more and more mainstream and expected of
> projects, so we should do the same.
> I would like to propose the following:
> 1. Change the git server side to automatically update the 'master'
> branch, whenever an update is pushed to 'main'.
> It's important to have a long transition period in order to avoid
> breaking downstream users' workflows.
> 2. Change the git server side to refuse a push to 'master' if 'main'
> exists. This avoid accidental branch divergence
> 3. Developers simply change their git configs to always push to 'main'
+1 for switching to main.
main is shorter than master, faster to type and less chance of typos.
Indifferent on keeping master up to date though, I think freezing it
at the point of switching to main is fine. I would also be okay with a
single (divergent) commit that puts a big fat warning somewhere to use
main from now on.
> Once this change is well established, we can look into removing
> 'master', but we should definitely take our time with that.
Not sure if this is a good idea, for preservation purposes. And
probably reproducibility, for cases where the branch name is
stored/used somewhere. E.g. if someone is using our (sub)projects in
Yocto, their recipes will break if we delete master, since Yocto
requires you to specify a branch and will loudly complain if the
commit isn't part of the branch (well, probably already fail at the
step of checking out the branch).
But as mentioned above, I'm fine with master not being kept up to date.
> - Felix
> openwrt-adm mailing list
> openwrt-adm at lists.openwrt.org
More information about the openwrt-adm