I have two projects, A and B. They were poorly divided, because A had to run one part before B and another part after B. So I decided to merge them. B's contents were copied into A's working directory, committed, and work continued from there.
Of course, B's history was not preserved in the copy-paste. I want to fix this before it's forgotten and bites someone later.
How can I modify A's repository's history to show an import from B's repository?
I think I need to introduce a new root node, copy B's stuff onto that root, then replace the 'add new files' commit with 'merge rooted B into A'. I have no idea how to do any of those.