GitLab / Lock branch or repository for maintainers only

Objective

  • To provide instruction on locking down branches/repos so that only maintainers (formerly masters) are able to edit

Environment

  • 66438: GitLab (SaaS)
  • University Development Environment

Resolution 

  • You must be a manager (formerly master) to make this change

  1. Log in to GitLab
  2. Open the desired repository
  3. On the left toolbar, select Settings
  4. Select Repository
  5. Select Expand for Protected Branches
  6. Select the button for Add Protected Branch
  7. Select Master for Branch
  8. Select Maintainers for Allowed to Merge and Allowed to Push
  9. Select Protect