Help with branching and merging strategy

siddjain March 18, 2021

We have a project with following three main branches:

  • development: used to deploy to DEV environment
  • staging: used to deploy to staging environment
  • release: used to deploy to production environment

Our default merging strategy is Squash, fast-forward only --squash --ff-only i.e., If the source branch is out of date with the target branch, reject the merge request. Otherwise, combine all commits into one new non-merge commit on the target branch.

We like this strategy for PRs where the source branch is a temporary branch created by the developer for purposes of code-checkin, but this policy is not desired when the source branch is one of {development, staging, release}. And I think this is a common use-case and scenario. However we cannot find any setting to allow a different merge strategy when the source branch is one of {development, staging, release}.

How can we do this? I think what we are asking is common practice in development where any on-going changes are committed as --squash --ff-only by developers but merges between the three canonical branches are made using the traditional merge strategy of Merge commit --no-ff i.e.:

Always create a new merge commit and update the target branch to it, even if the source branch is already up to date with the target branch.

 

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events