I would like to force other team-members to not work on the master-branch but on a development branch. we have a central git-repository where we push our work into. i would like to know if it's possible to block users from pushing changes to the master-branch but only allow certain users to do so.
I would like to have the following "workflow"
Is this possible and how can I achieve this?
See man githooks
: In the shared repo, you can create a $(git rev-parse --git-dir)/hooks/pre-receive
or $(git rev-parse --git-dir)/hooks/update
script that verifies what your users are trying to push to which refs. Git comes with a update-paranoid example hook enforcing per-ref ACLs.