I get it for feature branches:
- A feature branch is created from
develop
. - One single PR is then created, going to
develop
. - If there are conflicts, fix them in the feature branch.
Quite straightforward.
Concerning "multi-destination branches" though, like release or hotfix branches, how are conflicts supposed to be resolved? Say for example with a hotfix branch:
- A hotfix branch is created from
master
. - Question: two PRs are created, one going to
master
, and one going todevelop
, right? - Then, question: what if there are conflicts? For example, the branch does not conflict with
master
, but it does withdevelop
: where to resolve them? Do we need two distinct branches so thatmaster
doesn't receive the conflict resolutions that were needed fordevelop
?
Boss level: a hotfix branch when a release branch is ongoing. Does this case need three PRs: to master
, develop
and the release branch?
the branch does not conflict with master, but it does with develop
-- Normally, you would periodically keep yourdevelop
branch synced with master, so that your work stays aligned with what's going on in the master branch.master
the hotfix first and then resolve the merge conflict on the hotfix branch fordevelop
and merge it. Similarly your boss-level. The hotfix is for the release before the current release branch.develop
another change has been made in the same part of code where the hotfix also needs to be applied.