I would like to protect my git repository so only non master branches can be overwritten. Is there a way to protect only selected branches?
You can prevent non-fast-forward updates by configuring denyNonFastForwards
denyNonFastForwards
git config --system receive.denyNonFastForwards true
But it applies for all branches. For more info please refer ProGit