git: Merged two branches into each other – is this bad?
I accidentally merged two branches into each other.
(If you want to know how I did that: With gitlab I merged branch A into branch B in the web interface and in SourceTree client I merged B into A. Stupid, I know…)
Then also, because I had to fix something real quick, I worked with the merged branch. It looks like this now:
Is this a problem? Why?
Currently, everything seems to work correctly.
Should I solve that merge? How can I solve it?
(Later I have to merge everything into “master”. I hope there will be no problems.)
One Solution collect form web for “git: Merged two branches into each other – is this bad?”
No, it is not a problem if the result is what you want, meaning both branches are identical now. You first merged the changes of the left branch into the right branch, so that the right branch has everything of the left branch plus its own commits, then you merged the changes of the right branch into the left branch, so that both have the same content now. If you wouldn’t have used
--no-ff option, then there would actually not have been a second merge commit, but simply the branch pointer of the left branch would have pointed to the same commit as the branch pointer of the right commit, which is the first merge commit.