Re: How-to combine several separate git repos?

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Daniel Barkalow
Date: Sunday, December 9, 2007 - 11:51 pm

On Sun, 9 Dec 2007, Wink Saville wrote:


I should probably explain (now that I know it's actually relevant).


Get the history and data, as an extra branch, so we can deal with it 
easily.


We want to generate a merge commit, but we want to mess with it, so we use 
merge to set it up, but --no-commit to not actually commit it. (The commit 
below will generate a merge commit if we don't cancel stuff entirely.)


Replace the index (--reset), updating the working directory (-u), with 
HEAD (the commit on the local side before the merge we're in the middle 
of).


Read into the index, updating the working directory, "foo" (the branch we 
fetched above), but with the prefix "foo/" so everything is stuffed into a 
subdirectory.


And commit the result, which has the tree as constructed above (everything 
from the local parent, and everything from the branch in a subdirectory), 
and has the parents as for the merge we started: first parent is the local 
line without the additional branch, and the second parent is the added 
repository.

And git doesn't care about global structure, so the fact that this commit 
is obviously just what you'd ideally like, while the history as a whole is 
a bit odd (like, it doesn't have a unique start, and development didn't 
start in subdirectories, and...) doesn't matter.

	-Daniel
*This .sig left intentionally blank*
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
How-to combine several separate git repos?, Wink Saville, (Sat Dec 8, 11:34 pm)
Re: How-to combine several separate git repos?, Alex Riesen, (Sun Dec 9, 3:43 am)
Re: How-to combine several separate git repos?, Wink Saville, (Sun Dec 9, 12:12 pm)
Re: How-to combine several separate git repos?, Daniel Barkalow, (Sun Dec 9, 12:55 pm)
Re: How-to combine several separate git repos?, Wink Saville, (Sun Dec 9, 4:44 pm)
Re: How-to combine several separate git repos?, Daniel Barkalow, (Sun Dec 9, 6:11 pm)
Re: How-to combine several separate git repos?, Wink Saville, (Sun Dec 9, 7:29 pm)
Re: How-to combine several separate git repos?, Daniel Barkalow, (Sun Dec 9, 8:01 pm)
Re: How-to combine several separate git repos?, Wink Saville, (Sun Dec 9, 11:36 pm)
Re: How-to combine several separate git repos?, Daniel Barkalow, (Sun Dec 9, 11:51 pm)
Re: How-to combine several separate git repos?, Wink Saville, (Mon Dec 10, 12:01 am)
Re: How-to combine several separate git repos?, Alex Riesen, (Mon Dec 10, 12:52 am)
Re: How-to combine several separate git repos?, Wink Saville, (Mon Dec 10, 10:55 am)