Migration
Migrating Branching Strategies
Follow the existing migration procedure and identify protected-branch requirements.
Explore migration through the chapter's existing explanations and examples.
Understand production branches using the demonstrated Git workflow.
Review branch protection and the relevant practical considerations.
Migrating projects to the new branching strategies is a simple task outlined below.
Note: The process applies to release deployment projects. Any legacy continuous deployment project simply follows the instructions here.
Migration Process
-
Determine which branch is deployed to production.
- For illustration purposes, let's say it's
current-prod
- For illustration purposes, let's say it's
-
Merge
current-prodintomaster$ git checkout master $ git merge current-prod -
Create a
developbranch off ofmasterif none exists$ git checkout master $ git checkout -b develop -
Notify your team branching & release Czar so that he or she can protect the following branches:
masterdevelop
Protected Branches
Github offers a feature called Protected Branches. We leverage this to make sure our core branches are safe.
To protect a branch, follow these instructions:
- Navigate to your Github repository
- Click on Settings and then on Branches in the left-hand navigation
- In the Protected branches section, configure both
masteranddevelopbranches.