There are 3 projects each with their own git repo:
- Project A, a project independent of B
- Project B, a project independent of A
- Project AB, a project that uses some of A and some of B. An amalgamation of sources, file structures, etc, with some modifications to allow the two to blend properly.
Project A and Project B are mostly dead, but did receive minor patches after AB was created, some of which were later ported to AB. AB's git repo was created without history from either A or B. It is easy for me to tell which file or directory came from A and which came from B, and I know what commit each of the initial files was taken from.
How do I Restore history for AB before the init, assuming that all files in AB are based on files from A or B?
Keep in mind the following:
- Files from A may be in a B-like directory, and vice versa, so I should be able to handle moves
- At some point, I'd like to rebase AB's ported patches so that they are attributed to a merge from either A or B.
- I would like for A or B to be able to merge AB, although having only one of them be able to do this would be okay, as long as I can control which one.
- There are about 30-50 files, so it would still be possible for me to rebase for each file, it would be preferred if I didn't have to.