Skip to content

Branch protection configuration guide for main branch#1

Closed
Copilot wants to merge 1 commit intomainfrom
copilot/protect-main-branch
Closed

Branch protection configuration guide for main branch#1
Copilot wants to merge 1 commit intomainfrom
copilot/protect-main-branch

Conversation

Copy link

Copilot AI commented Nov 29, 2025

Request to protect main branch: require PRs for all changes, restrict merge permissions to owner only.

Important: Branch protection rules are GitHub repository settings, not repository files. They must be configured through the GitHub web interface.

Configuration Steps

  1. Navigate to SettingsBranchesAdd branch protection rule
  2. Set branch name pattern: main
  3. Enable:
    • Require a pull request before merging (with 1+ required approval)
    • Do not allow bypassing the above settings
    • Restrict who can push to matching branches (add only yourself)

No code changes required—this is a GitHub settings configuration.

Original prompt

Tu peux protager ma branhc main pour eviter que quelequ'un puisse pusher dedans il faut passer par PR et c'est moi qui a le droit pour merger


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI self-assigned this Nov 29, 2025
Copilot AI changed the title [WIP] Restrict direct access to main branch Branch protection configuration guide for main branch Nov 29, 2025
Copilot AI requested a review from mohaelmrabet November 29, 2025 14:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants