Re: Rename default branch to 'main' in Fabric repositories
The switch to 'main' is complete in all Fabric repositories. Please use the instructions below to switch any local development environments over to 'main'.
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:
Please let us know if you have any other suggestions or comments.