Reputation: 1890
My git log looks like this:
-------> develop
\---> A
\---> B
Branch A is based off of develop, and is being reviewed in a pull request. In the meantime, I need to develop more stuff off of the branch, so I create Branch B. There is also a pull request for Branch B into develop, which includes the commits for both Branch A and Branch B.
The review of branch A finishes, and it is merged into develop, at which point, Github says that I need to merge develop into branch B, but if I do this, then usually it generates a lot of merge conflicts and can be difficult to untangle.
Is there a way to do pull requests for both Branch A and B simultaneously, without Branch B's pull request getting confused when Branch A merges in?
Upvotes: 4
Views: 1642
Reputation: 7712
Github says that I need to merge develop into branch B, but if I do this, then usually it generates a lot of merge conflicts and can be difficult to untangle.
Instead of a merge, rebasing B on top of develop could be less conflict-prone, if the change in refs isn't otherwise a problem for you.
Upvotes: 0
Reputation: 1890
One solution may be to use the Github feature that allows you to change the base branch of a pull request. So the workflow looks like this:
Once you change Branch B's base, then I think Github should show the proper diffs, but haven't tested this yet.
Upvotes: 3
Reputation: 1543
I see a problem with the workflow here. Why are you merging a branch into something other than the branch it was created off?
Changing the workflow like this can get everything working smoothly:
Upvotes: 3