I am looking for advice or warnings about merging three Git repositories. I need to maintain the commit history and all branches.
I have examined this question and this question, and it seems like the "git-subtree" command would have done what I want, but it seems like that command has been removed or something (the comments seem to conflict on this issue.) There is a "git subtree" command but I am not sure what it does, and the documentation is rather thin.
I have three Git repositories that each contain a Maven project. The files and repositories do not overlap at all (no project is a Git submodule of any other, for example.) They are totally separate except for code in B and C that references A:
ProjectA.git
pom.xml
/src/....
ProjectB.git
pom.xml
/src/...
ProjectC.git
pom.xml
/src/...
I would like to merge them into one "Parent" repository:
Parent.git
/ProjectA
pom.xml
/src/...
/ProjectB
pom.xml
/src/...
/ProjectC
pom.xml
/src/...
I need to maintain the commit history and all branches, but I am not interested in maintaining the individual repositories as submodules or as separate repos. In fact, it would be better if they went away after this process so that people are not tempted to continue using them.
What is the simplest and most reliable way of doing this? Is there a way of accessing the git-subtree command (I am running on Windows 7 using Git 1.8.0) or a way of doing this merge without that command?