Subject: Re: Canonical method of merging two projects

From: Gabriel <[email-masked]>
Date: Mon, 14 Apr 2008 06:56:25 +0000 (UTC)

Hello,

On Mon, 14 Apr 2008 07:37:17 +0100, Peter Karlsson wrote:

> What is the canonical way of merging an unrelated project into another
> so that all of the merged project's files appear in a sub-directory of
> the first?
> 
> I have two projects, A with files "a.txt" and "b.txt", and B with files
> "a.txt" and "c.txt", each in a separate Git repoistory. I want to merge
> those two projects, throwing away the B repository, and achieve a file
> layout that has "a.txt" and "b.txt" from A, and "B/a.txt" and "B/c.txt"
> from B. I.e, the two files with the same name are unrelated, and all of
> B's file should end up in a sub-directory.

This is exactly what the subtree “merge strategy” does;
there is a HOWTO here:
http://www.kernel.org/pub/software/scm/git/docs/howto/using-merge-subtree.html