How do I allow contributors to make branches, but not commit to main in an organization?

1k views Asked by At

Context: Me and my colleagues, are working on a college project. Some of them are new to git, github, and react. I created a github organization, thinking it would be easy to manage.

I want to divide people into 2 roles, reviewers and contributors (juniors) such that contributors will not have write permission to the main branch, but can create new feature branches in the same repo and will have to get PR approvals from reviewers to merge to main. I'm aware of teams and branch protection rules, but I'm not sure what the correct setup is. How can I achieve this?

0

There are 0 answers