Re: [Zephyr-devel] Changing default branch name on GitHub - possible action required

Kumar Gala

Will see if other downstream users request such support.

How long would want for the various phases?

- k

On Mar 11, 2021, at 11:45 AM, Jack Rosenthal <jrosenth@...> wrote:

The typical way I've seen this done is:

Phase 1: Create the main branch at the same commit hash as master. Repo maintainers make sure that the main branch is synced to master.
Phase 2: Set the default branch to "main". Continue syncing "main" and "master".
Phase 3: Stop syncing "main" and "master". Master goes stale.
Phase 4: Delete the (now stale) master branch.

I'm not sure if GitHub has tools for branch syncing, but it can be done easy enough from the command line by someone with push access.

On Thu, Mar 11, 2021 at 10:38 AM Kumar Gala <kumar.gala@...> wrote:

We are utilizing what GitHub provides and as far as I can tell once we make the change to the default branch from ‘master’ to ‘main’ the ‘master’ branch will no longer exist in the repository.

So downstream users will need to adjust after the change is made.

If you have some means to handle such a synchronization its something that we can discuss.

- k

On Mar 11, 2021, at 10:12 AM, Jack Rosenthal <jrosenth@...> wrote:


Will there be a period of time that we have two main branches ("master" and "main") that are auto-synced to give time for people to adjust their tools?



On Thu, Mar 11, 2021 at 6:32 AM Kumar Gala <kumar.gala@...> wrote:
We will be changing the default branch on github from ‘master' to ‘main' on Friday (Mar 11, 2021).

There is no action required for any open PRs, however you’ll need to update your local git clone as follows:

git branch -m master main
git fetch origin
git branch -u origin/main main

Will announce here when this change is made on Friday.


- k

Join to automatically receive all group messages.