You might desire to reorganize your code in the migration process. There are several tools which allow you to merge git repositories together.
* This one called [http://search.cpan.org/dist/Git-FastExport/script/git-stitch-repo git-stitch-repo] seems more capableis made for linear repos
* This other one [http://search.cpan.org/~book/Git-FastExport-0.105/script/git-stitch-repo by the same name], authored by Philippe Bruhat (BooK) is nonetheless capable of [http://www.ifup.org/posts/the-right-tool-for-the-job-git-stitch-repo/ merging two (or more) repositories]
* This one, [https://github.com/robinst/git-merge-repos git-merge-repos] is interesting because it talks about taking multiple repositories with more or less the same branches or tags, and merging them at the tag