Possible Duplicate:
How do you merge two git repositories?
I have an existing git repository A.
For another project, project B, my colleague has gone ahead and created a new git repository. We've added a bunch of code to this repository so naturally its structure does not resemble repository A.
Now it turns out that the we'd like to use A in the project B. Ideally we'd like to fork A into the repository that already exists for B under a subdirectory of B as to not interfere with the work that's already there. Naturally we'd like to preserve the history of A (ie not just copy a bunch of source over).
We plan to then modify the cloned/forked A extensively for project B's specific needs (this is a throw-away demo).
What is the best way to do this? Can clone be used to acheive this? Or maybe I could clone A, move stuff to where I want it to go, and then attempt to merge it into B? Can you merge two repositories that have never had a shared history?