By default github provides three ways to merge a PR to a branch:
- Merge Commit
- Squash and Merge
- Rebase and Merge
Can we add some branch rule or is there any way we can restrict them and allow only one or two options for any given branch.
By default github provides three ways to merge a PR to a branch:
Can we add some branch rule or is there any way we can restrict them and allow only one or two options for any given branch.
You can go to your repository Settings > General, and disable these options as necessary.
This is currently not supported by GitHub, as evident from the ongoing discussion at: https://github.com/orgs/community/discussions/10809