Git prevent push to master

git

This is my first time setting up a git server, so I don't really know what I am doing yet. Anyways, I have a git server setup with a user, What I want is to have multiple developers that can create their own branches and push the branches to origin, but I don't want them to push anything to master; an admin will merge after a code review. Is that possible?

Best Answer

Gitolite can do this for you. There's no way for you to set this up with the default git setup.