Configure Merge Button by branch?

In a PR, the Merge Button can have three possibilities:

  1. Create a merge commit
  2. Squash and merge
  3. Rebase and merge

You can configure which of these possibilities can appear repository-wide.

Is it possible to configure this by branch?

I would like to configure:

  • master: only merge commits
  • develop: only squash
    or whatever suits your branching policy.

Now, the person that clicks the merge button by default will see whatever was the last option they used (maybe in a different branch) and must change the option. It’s not hard, but it’s a source of error.

2 Likes

Hi @alexander-bunkenburg-chartboost :wave:

I can see how this can limit user error when it comes to creating Pull Request. However, we do not have this sort of functionality at this time. There isn’t a method by which you can limit the merge options based on the branch.

We’re always working to improve GitHub and the GitHub Support Community, and we consider every suggestion we receive.
You can do so by submitting this through our official product feedback form so that our product team can track your request.

You can also keep an eye on our Changelog as well as the GitHub public roadmap to see features we are working on.

ah, that’s what I’m looking for :heart:

1 Like