Skip to content
Ameen Abozaid
Planned lessonJNR-051-L05

Branch protection

  • Lesson 5 of 7
  • Junior
On This Lesson 4 topics

This lesson is planned. The outline below lists the topics it will cover. The full lesson has not been published yet.

In this lesson

stop broken code reaching main.

Planned topics

  • Branch protection rules (or rulesets) apply to main.
  • Require pull requests, at least one review, and passing status checks before merge.
  • Block direct pushes and force pushes.
  • The required check names must match the job names.
  • Rules apply to everyone, including admins if configured.
Draft outline details

Demonstration

the repository settings page with "Require status checks to pass" ticked and the build check selected.

Check your understanding

What stops a PR with a failing test from merging?

Show answer

A required status check.

Practice

Apply this lesson with the module's lab, exercises and quiz.

Lab and exercises Quiz

Marking a lesson complete is optional and you can undo it any time. Your progress stays in this browser.

Continue to next lesson

Type to search levels, phases, modules and lessons.