How to set the receive.denyNonFastForwards on a repository in GitHub

后端 未结 2 1078
说谎
说谎 2021-01-12 07:12

I have a repository hosted on GitHub which has several forks.

How can I set up the config of the main repository to set the receive.denyNonFastForwards

2条回答
  •  刺人心
    刺人心 (楼主)
    2021-01-12 07:58

    Github enterprise edition now has a feature for disabling force pushes. For the ones not using the enterprise edition you can configure a pre-push hook.

    It is a good practice to never force-push to master unless absolutely necessary.

提交回复
热议问题