Problem
The default branch (main) has no branch protection rules configured. This means anyone with write access can:
- Push directly to
main without a pull request
- Force-push to
main, potentially rewriting history
- Delete the
main branch
Recommended Policy
Enable branch protection on main with at minimum:
How To Enable
- Go to Settings > Branches > Add branch protection rule
- Branch name pattern:
main
- Configure the settings above
- Save changes
References
Problem
The default branch (
main) has no branch protection rules configured. This means anyone with write access can:mainwithout a pull requestmain, potentially rewriting historymainbranchRecommended Policy
Enable branch protection on
mainwith at minimum:How To Enable
mainReferences