Allow administrators to choose which merge strategies are allowed to be chosen

Issue #14244 open
Marcus Schumann
created an issue

Would be great to be able to force developers to only be able to use certain types of merge strategies.

In our case we want to disable all types of merge strategies except for squash. Currently some developers miss this and choose the default "merge", creating a very unclean history for our master branch. It also makes it difficult to cherry pick hotfixes from master branch to our specific release branch.

Please provide the option to choose which merge strategies are available in drop down when merging PRs!

Comments (4)

  1. Alastair Wilkes staff

    Now that #13895 (default merge strategy) has shipped, accidentally choosing the wrong strategy should be mostly prevented.

    But this would still be hugely valuable, especially for teams who want to enforce certain workflows.

  2. Brandon Carpenter

    I would also love this feature. However, unlike the OP, I would like to forbid the squash merge strategy.

    Team members are finding the merge strategy as an "easy" way to reduce the commits after code review. But then we end up with a bunch of messages like "Addresses code review issues" in the squashed commit message, which makes a mess of the logs, filling them with unhelpful cruft. It also makes merging more difficult in situations where changes were cherry-picked between branches.

    Our written policy forbids the use of the squash merge strategy, but some of the team still occasionally use it when they are in a hurry. Disabling the strategy would prevent these mistakes.

  3. Log in to comment