1

After several years of separation, we're merging two large git repositories (FOO and BAR). Unifying the build scripts requires some non-trivial changes, so we expect this effort to stretch over a few days while we test those changes. During that time, we expect several changes to both original repos. Here's what I'd like to end up with:

  • File/directory layout in the final repo should mimic the structure of FOO, but with a new BAR directory that contains the contents of the original BAR repo
  • History should be retained for both repositories
  • We want to easily merge changes from the original repos into the new repo, while we iron out the build scripts

The first two are no problem (though, as usual, there are different approaches). It's the third that has me stumped. How can I merge daily changes from the old repos, particularly BAR, into the new structure? Or have I missed a better approach entirely?

Lemur
  • 442
  • 6
  • 11
  • Are you merging two _repositories_ or two _branches_? Not the same thing. – Tim Biegeleisen Jun 15 '19 at 01:02
  • 2
    You may take a look at https://stackoverflow.com/a/1426163/1157272. Maybe you could use submodules while fixing the build script and then do a subtree merge when you are ready to do the final merge. – joran Jun 15 '19 at 06:11
  • As stated in the question, the goal is to merge the two repositories. Branches aren't a worry for this task. – Lemur Jun 17 '19 at 18:09
  • @joran: That looks like a pretty good option. I'll give it a try! – Lemur Jun 17 '19 at 23:39

0 Answers0