Disable push to specific branches on GitHub

前端 未结 4 914
予麋鹿
予麋鹿 2020-12-28 12:53

I have some Git private repositories on a GitHub company account, and I don\'t want anybody to push on some specific branches (like master, develop and beta or by pattern).

4条回答
  •  星月不相逢
    2020-12-28 13:55

    The hooks you are looking for are pre-receive and update - the former is run once per push, the latter once per branch per push; but importantly, these are hooks on the server side.

提交回复
热议问题