I really liked the feature GitHub Template Repository where according to the documentation
After you make your repository a template, anyone with access to the repository can generate a new repository with the same directory structure and files.
What I also want to accomplish is to copy the the labels and settings of the template repository. This would ease processes and bring in standardisation.
Following could be the possible settings which I would like to be inherited from template repository
Allow merge commits
Protected branches
master branch /docs folder
After pull requests are merged, you can have head branches deleted automatically
Have you tried this ? If yes, how were you able to do it ?
2023: ruleset and repository rules can help set rules on branches.
2020: For now, "Creating a repository from a template" does not extends to settings, only repository structure.
If said repository is part of an organization, you have a common set of settings you (as administrator of that organization) can manage.
Note: Jorge Leitao adds in the comments:
As of today (Jan. 2023) org-level settings do not support branch rules nor most of project settings (even Enterprise Plan)