-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
Problem
The default branch (main) has no branch protection rules configured. This means anyone with write access can:
- Push directly to
mainwithout a pull request - Force-push to
main, potentially rewriting history - Delete the
mainbranch
Recommended Policy
Enable branch protection on main with at minimum:
- Require a pull request before merging
- Require at least 1 approval
- Dismiss stale pull request approvals when new commits are pushed
- Require status checks to pass before merging (if CI is configured)
- Do not allow force pushes
- Do not allow deletions
- Consider: Require signed commits
- Consider: Require linear history
- Consider: Include administrators in these restrictions
How To Enable
- Go to Settings > Branches > Add branch protection rule
- Branch name pattern:
main - Configure the settings above
- Save changes
References
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels