Typical rules: no direct pushes, required approvals, required passing CI checks, no force-push. The exact options depend on the platform and plan.
Branch protection
Hosting-platform rules that restrict how a branch such as main can be changed.
Typical rules: no direct pushes, required approvals, required passing CI checks, no force-push. The exact options depend on the platform and plan.