'How to work on a new git branch while previous branch waits for merge
First, I am sorry to ask such question because I am sure it is a straightforward issue, still I found no solution an no way to understand what I am doing wrong. Some people asked almost exactly the same question (except the squash part) and the answer was obvious (rebase) but does not work for me.
I create a branch A, multiple commits, then I submit a merge request A->develop, with commit squash on.
While I wait for the MR to be accepted, I want to work on a new issue, from the branch A. So I create a branch B from branch A.
At some point branch A got merged into develop, and all the commit from A squashed into a single commit in develop.
Once my work on B is finished, I create a new MR B -> develop. But I can't because develop has been updated with changes from A. As I already have these changes in my branch B, because I created B from A, it should not be an issue. But it is.
No matter what I do from B:
git merge develop
or:
git rebase develop
I get an endless list of fake conflicts.
I suspect the issue is that the commit logs on my branch B includes all old commits of the branch A, whereas develop includes only one single squashed commit of the branch A. So they are not seen as the same commits and I get conflicts even though there are no actual conflicts. But I have no solution.
Any help would be appreciated. Thanks.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
