I see two options for using automatic merge:
- If you use feature / bugfix brunches, but there are no pull requests / integration branches in your process, i.e. You are ready to immediately merge into the master. This allows you to achieve isolation changes and their automatic integration. (Although to me personally, such a model seems doubtful, especially for fairly large changes, because it forces you to make local commits without pushing, and this can be fraught.)
- If you use an integration brunch, where features / bugfix brunches are flowing in. Changes are tested, and then merged into the master.
In the second case, the integration brunch is essentially a copy of the wizard with the added changes. Therefore, when pouring into the integration brunch, conflicts can arise for two reasons:
- changes conflict with master
- changes conflict with changes from another feature / bugfix brunch, which were merged into the integration branch, but have not yet entered the master
In both cases, to settle the conflict is sufficiently merge from the integration branch. The first case is obvious - there are conflicting changes from the master in the integration branch as well. The second case is also obvious - without the green integration branch, the work will not go further. And here there is a standard rule - whoever commits the last one, he merges :).
the idea is to detect conflicts as early as possible.
Then maybe you should just add the merge from the wizard to the feature / bugfix branch for each build? If we talk about TeamCity, then the first step of the build is to add the following code:
git remote set-url origin %repo_url% if NOT %teamcity.build.branch.is_default%==true git fetch if NOT %teamcity.build.branch.is_default%==true git merge origin/master
It is guaranteed to detect conflicts immediately. The master will always be "green", you will not get conflicts due to the fact that someone has flooded the conflicting changes in the integration branch.
когда кто-нибудь делает коммит- just a commit, not a merge-request? Not always commit means that the feature is complete and ready for testing. If the commit is automatically merged, it will encourage developers to commit less often (or not to push on the remote), which is fraught with loss of work results. - Nick Volynkin ♦