I'd like to restrict write access to the master branch in a github organization repository to its owner (namely me). This would enforce all contributors to make a branch instead of committing directly to master. If possible, I would also like to restrict access to approving pull requests to only me.
I did some research and came across GitHub protected branches, and I believe it might be the solution. But there are too many options to understand. The linked help page didn't help me either.
Best Answer
Yes, you will want to look into the Protected Branch settings.
If others need to do their work on another branch instead of working directly off master, check the following box:
To then also limit who can approve it should be by selecting this checkbox:
By default that will restrict it to admins only. If the repo has other admins listed then you'll want to get that sorted out because the included owners are: