Skip to content

Latest commit

 

History

History
22 lines (17 loc) · 1.37 KB

02.A-Create-QA-Branch.md

File metadata and controls

22 lines (17 loc) · 1.37 KB

Creating additional protected branches

Many companies follow different models of deployment and git flow. Some only require the simple GitHub flow, while others use a more legacy git flow. If you follow more of the Git Flow, you will likely need to create additional protected branches like DEV, QA, or PROD.

gitflow

An example workflow which adopts the Git Flow branching strategy

Once you have set up those branch protections, you can then use them later on to help trigger additional workflows and flags.

To protect our new branch(es) and require at least one review and a passing test, perform the following:

  1. On GitHub, navigate to the main page of the repository.
  2. Under your repository name, click Settings.
  3. In the left menu, click Branches.
  4. Next to "Branch protection rules", click Add rule.
  5. Under "Branch name pattern", type DEV or QA or PROD.
  6. Select the Require pull request reviews before merging checkbox.
  7. Select the Require status checks to pass before merging checkbox.
  8. Select the Continuous Integration checkbox in the Status checks found in the last week for this repository.
  9. Click Save changes.
  10. Repeat for all branches you wish to protect.