• Our product teams collect and evaluate feedback from a number of different sources. To learn more about how we use customer feedback in the planning process, check out our new feature policy.

      Having a default merge strategy is a great start, but we need to be able to set it per branch for it to be really useful.

      I suggest to set the merge strategy for a target branch. For our feature branches merged into a dev branch we want to squash all commits. But for the dev -> master merge we do not want to squash but keep dev and master branch exact replicas.

            [BCLOUD-16283] Set default merge strategy per branch

            saurav.kumar added a comment -

            +1

            saurav.kumar added a comment - +1

            tecklead added a comment -

            ++1

            tecklead added a comment - ++1

            + 1

            Dawid Paszek added a comment - + 1

            +1

            Karol Drwiła added a comment - +1

            Viktor Ingemarsson added a comment - - edited

            It is crazy that this is not a feature yet.

            +1

             

            Viktor Ingemarsson added a comment - - edited It is crazy that this is not a feature yet. +1  

            +1.  Please add this feature.  Azure Devops has this feature and it was very helpful.

            carlosonline added a comment - +1.  Please add this feature.  Azure Devops has this feature and it was very helpful.

            Flowie is addon for Bitbucket that allows you to set default merge strategies and restrict them based on different condition, including source/destination branch. It also add more strategies using rebase.

            You can, for instance, define a single strategy for a branch and define to always close the branch - not relying on the user remembering it. It helps to implement and enforce the workflow.

            It's available on the marketplace and you can test it for free.

            Hope it helps!

             

            Saxea _Flowie_ added a comment - Flowie is addon for Bitbucket that allows you to set default merge strategies and restrict them based on different condition, including source/destination branch. It also add more strategies using rebase. You can, for instance, define a single strategy for a branch and define to always close the branch - not relying on the user remembering it. It helps to implement and enforce the workflow. It's available on the marketplace and you can test it for free. Hope it helps!  

            thu added a comment -

            +1

            thu added a comment - +1

            This issue has been open for more than 4 years.

            If it's too difficult to set a default merge strategy per branch, setting one distinct default merge strategy for the master branch would help a lot.

            The main drawback of one single merge strategy applied indiscriminately to every branch is that PRs get occasionally squashed to master when I forget to change the merge strategy before clicking on the merge button.

            Or is it possible to set the intended merge strategy when the PR is created (similar to « Delete branch after the pull request is merged » checkbox)?

            Frédéric Marchal added a comment - This issue has been open for more than 4 years. If it's too difficult to set a default merge strategy per branch, setting one distinct default merge strategy for the master branch would help a lot. The main drawback of one single merge strategy applied indiscriminately to every branch is that PRs get occasionally squashed to master when I forget to change the merge strategy before clicking on the merge button. Or is it possible to set the intended merge strategy when the PR is created (similar to « Delete branch after the pull request is merged » checkbox)?

            This would be very useful, we would love to set development branches to squash merge but with a single default it's too easy to overlook and accidentally squash into main.

            james.archer-thomas added a comment - This would be very useful, we would love to set development branches to squash merge but with a single default it's too easy to overlook and accidentally squash into main.

              Unassigned Unassigned
              4da296369d6b BasPH1
              Votes:
              137 Vote for this issue
              Watchers:
              72 Start watching this issue

                Created:
                Updated: