I’m trying to create a repository template for new repositories.
One of the requirements is to disable force push to master by default.
I know that i can enable branch permission for the master branch and then whitelist restricted push.
Using this setting does what i want (No one can force push to master).
My repository template doesn’t has any branches and therefore i cannot configure the force push restriction.
Is there a way to disable force push to master (or any other branch) on a repository template where the template doesn’t has any branches yet?
Edit:
Second question: Is is possible to apply such rules to branch name via wildcard? We often have multiple release branches with names like release/<x.y.z>.
Can i apply the rule to release/* ?