Re: Rename default branch to 'main' in Fabric repositories


Jay Guo
 

Okay, thanks!

On Tue, Mar 16, 2021 at 20:54 David Enyeart <enyeart@...> wrote:

The github rename function will automatically re-target open PRs to main and automatically redirect master web traffic to main.


Dave Enyeart

"Jay Guo" ---03/16/2021 07:34:20 AM---Hi Dave, some minor questions here: 1. will outstanding PRs be automatically updated to re-target ma

From: "Jay Guo" <guojiannan1101@...>
To: David Enyeart <enyeart@...>
Cc: fabric <fabric@...>
Date: 03/16/2021 07:34 AM
Subject: [EXTERNAL] Re: [Hyperledger Fabric] Rename default branch to 'main' in Fabric repositories
Sent by: fabric@...





Hi Dave, some minor questions here: 1. will outstanding PRs be automatically updated to re-target main? 2. will visits to master branch be redirected automatically to main? (I suppose github should support this via renaming feature?) ‍‍‍‍‍‍


Hi Dave, some minor questions here:

1. will outstanding PRs be automatically updated to re-target main?
2. will visits to master branch be redirected automatically to main? (I suppose github should support this via renaming feature?)
3. If the answer to 2 is yes, then I suppose other projects that pull Fabric master during CI should not be affected?

Thanks!

On Tue, Mar 16, 2021 at 1:52 AM David Enyeart <enyeart@...> wrote:

    Based on industry and Hyperledger recommendations, we will be switching default branch from 'master' to 'main' on all Fabric repositories.

    I plan to switch all Fabric repositories on Friday March 19th. Doing them all the same day will limit any temporary link breakages across the repositories and docs. Everything should be in working order by Monday.

    A few of the repositories have been done already. I've tested the process on Fabric CA repository since it follows similar CI and doc approach as Fabric.

    Here is the process that I will be following for each repository:
    - Use the new Github feature to rename default branch. This automatically re-targets PRs to "main" and updates branch protections rules.
    - PR to update master references in CI pipelines, docs, etc
    - Update default branch in Azure Pipelines

    Once it is done for a repository, each developer that has a local fork will need to perform the following steps to update their local environment, push the main branch to their fork and associate with local main branch, and ensure local main is rebased on the upstream main branch:
    git checkout master
    git branch -m master main
    git fetch origin
    git push origin main
    git branch -u origin/main main
    git fetch upstream
    git rebase upstream/main

    The steps assume you are following the Github fork and upstream remote instructions here:
    https://hyperledger-fabric.readthedocs.io/en/latest/github/github.html

    Please let us know if you have any other suggestions or comments.


    Thank you,

    Dave Enyeart




Join fabric@lists.hyperledger.org to automatically receive all group messages.