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


David Enyeart
 

The switch to 'main' is complete in all Fabric repositories. Please use the instructions below to switch any local development environments over to 'main'.


Dave Enyeart

David Enyeart---03/15/2021 01:52:34 PM---Based on industry and Hyperledger recommendations, we will be switching default branch from 'master'

From: David Enyeart/Durham/IBM
To: fabric <fabric@...>
Date: 03/15/2021 01:52 PM
Subject: Rename default branch to 'main' in Fabric repositories




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.