I'd like to restrict write access for the master branch to only several developers, while allowing others to pull everything and push to other non-master branches. Idea is that a developer would push to some other branch and then if code passes review, reviewer would merge it into the master branch.
I'm pretty sure that this can be easily done with a git commit hook, but I don't know python and this seems like such a generic problem, that somebody must have written it already. Do you know where I could find such a script? Or if you have one lying around, please paste it here, for lazy people like me.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…