A way to restrict Git branch access?

When using GitHub, your best option would be for each developer to have their own fork of the master repository. Everybody pushes to their own repository and somebody with push access to the master repository handles pulling from each developer’s repository. This is how most open source projects work.

If using your own Git server, it should be possible to use hooks to prevent users from pushing to wrong branches.

Leave a Comment