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
receive.denyNonFastForwards
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.