I have a branch that's branched of a master
branch. It's more of a release
branch, if you will. This release
branch is protected.
master ---> release
and from this release
branch, I've been branching my features off of it and merging it in:
master ---> release <--- features
now once my features are into this release
branch, there are merge conflicts. Herein lies my problem. I know how to solve conflicts were it not a protected branch, but I'm not sure how to solve it otherwise.
What I've tried doing was something like this:
master ---> release ---> release-fix
and in release-fix
, I would rebase from master
and push it up, and make the base of that PR to be the release
branch. However when I make the PR, it says it's still unable to automatically merge. Is this the right way to do something like this?
I think there are multiple ways to do this, one being Dherik's answer. I typically do the opposite:
git fetch
# get copy of latest everythinggit checkout -b merge-release-into-master origin/master --no-track
# create a new branch off of mastergit merge origin/release --no-ff
# merge in the release branchpush -u merge-release-into-master
# Push out your new merge-release-into-master branch and PR it into master. Now it should go cleanly.As a side note, are multiple people merging into master in this way (multiple release or hotfix branches simultaneously)? If no, I'm not sure how you're getting merge conflicts in the first place from release into master.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With