- A fork is a natural way to give external contributors a place to work
- Really, that is the main reason to fork
A company does allow their developers to commit to the repository. A company does not want everyone to be able to merge to a release or master branch, using a fork for this is an over-complicated workaround:
- Developers need to maintain forks
- Additional setup to CI is required
- Whenever a change to the repository configuration is made, it needs to be made in all forks (for instance installing a webhook)
Does it have to be so difficult? Not at all. Here is where Protected Branches are awesome and a clean solution to this problem.
A Protected Branch is a branch with limited write access. Specify members (or groups) of your team that will be able to submit code to a branch:
Now, only these people will be able to push to the Master branch. Everyone else will have to contribute code through merge requests. They will be able to push to any other branch in the repo, but not Master.
Protected Branches enable various common techniques - mandatory review from a senior developer, release manager that maintains release branches, feature freeze a release candidate. We have no doubt you will find even more use for it.
Sometimes you just have to leave that Social Coding aside and get some work done.