At the start of the project we had a single repository with our solution in. Someone, based on a requirement to create another instance of the solution with a few 'branding' changes, made the decision to copy the solution in its current state and push it into a completely separate repository. Subsequently someone else did the same thing again.
We are now in the situation where we have three separate solutions sitting in three separate repositories all with very similar code. Copy paste refactoring has been high.
I want to pull all three back together so that we can make changes that will apply across a single code base and be deployed to separate environments (with config managed through DI, etc.).
I have tried what has been outlined to move all the separate repos into sub folders in a new repository based on the steps here: Merge two Git repositories without breaking file history
What I am finding is that the first repository merge works fine and I can put the code happily into its own subfolder, the second merge from the second repo I receive conflict merges when running the equivalent of git merge old_b/master
I think that this is because they effectively share the same origin (for want of a better word), based on when they were originally copied.
Is this assumption correct? How can I get around it to have a single repo?