Protecting Project Code with GitHub Branch Protection
To keep project code safe in GitHub, set repositories to private and enable branch protection rules that lock the main branch, block deletions and force pushes, require pull requests with at least two reviewers (and optionally Code Owners), and use a bypass list only when necessary.