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?
Extending the answer of Richard a bit: Use the following snippet as your "hooks/update" and pushing to master will only be allowed to the user with the name "git-repo-admin":
#!/bin/sh if [ $USER != "git-repo-admin" ]; then if [ "$1" == refs/heads/master ]; then echo "Manual pushing to this repo is restricted" exit 1 fi fi