stuffanna.blogg.se

Git rename branch master to main
Git rename branch master to main












git rename branch master to main

Add a new rule to the Github branch protection settings for the new trunk branch and copy all the settings from the master branch configuration over to the trunk branch's rules.This pushes the new trunk branch to Github. This creates a new trunk branch with the same history as master. We need to do this in order to prevent the new trunk branch from falling behind the HEAD of the repository's main branch. This effectively blocks anyone from merging during the period of time where we're performing the migration.

git rename branch master to main

  • On the selected date, freeze merges to the Gutenberg repository's main branch by requiring the maximum of 6 reviewers to merge a PR into the main branch.
  • One person should be delegated to run the git commands for creating and deleting the master branch.
  • We need to delegate someone (or multiple people to pair on it) with the required repository permissions to perform the steps below.
  • We need to select a date to perform this migration.
  • We need a PR that updates all references from master to trunk in CI and other scripts.
  • Furthermore, we can do the process ourselves with little extra effort (at least given that we have a script to retarget open PRs).

    git rename branch master to main

    I don't think we should bank on these tools becuase we don't know how Github is prioritizing their creation. Unfortunately there is no timeline for those tools other than "the end of the year" which is quickly approaching. The "wait for Github" approach will require the same prerequisites, however we would wait for Github to release the magic tools they write about here. One I'm calling the "manual" approach (described below) and the other is the "wait for Github" approach. There are two approachs that can be taken. This issue is, however, meant to propose a step-by-step process for updating the WordPress Gutenberg repository to use trunk as its main branch name. Those discussions should stay in the make post linked above 🙂 This issue is not to discuss whether this should be done or what new name to use. The decision to rename the main branch of WordPress git repositories from master to trunk was made in this make post:














    Git rename branch master to main