git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Wink Saville <wink@saville.com>
To: Daniel Barkalow <barkalow@iabervon.org>
Cc: Alex Riesen <raa.lkml@gmail.com>, git@vger.kernel.org
Subject: Re: How-to combine several separate git repos?
Date: Sun, 09 Dec 2007 22:36:35 -0800	[thread overview]
Message-ID: <475CDE73.9010505@saville.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0712092130560.5349@iabervon.org>

Daniel Barkalow wrote:
> On Sun, 9 Dec 2007, Wink Saville wrote:
>
>   
> Ah, okay. I was assuming that you wanted them to maintain their original 
> identities (so you'd send stuff off for each of them separately, for 
> example).
>
> I think you can do what you want by doing:
>
> # Set up the new line:
> $ mkdir x; cd x
> $ git init
> $ touch README
> $ git add README
> $ git commit
>
> # Add a project "foo"
> $ git fetch ../foo refs/heads/master:refs/heads/foo
> $ git merge --no-commit foo
> $ git read-tree --reset -u HEAD
> $ git read-tree -u --prefix=foo/ foo
> $ git commit
>
> And repeat for all of the other projects.
>
> What's going on here is that you're merging in each project, except that 
> you're moving all of the files from that project into a subdirectory as 
> you pull in the content. The resulting repository has one recent dull 
> initial commit, and then merges in each of the other projects with their 
> history, with only the slight oddity that they don't go back to the same 
> initial commit, and the merge renames all of the project's files.
>
> I think there may be a more obvious way of doing this (it's essentially 
> how gitweb and git-gui got into the git history), but I'm not sure what it 
> is, if there is one.
>
> 	-Daniel
> *This .sig left intentionally blank*
>   

Daniel,

Worked like a charm, someday maybe I'll understand why it works:)

Wink

  reply	other threads:[~2007-12-10  6:37 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-09  6:34 How-to combine several separate git repos? Wink Saville
2007-12-09 10:43 ` Alex Riesen
2007-12-09 19:12   ` Wink Saville
2007-12-09 19:55     ` Daniel Barkalow
2007-12-09 23:44       ` Wink Saville
2007-12-10  1:11         ` Daniel Barkalow
2007-12-10  2:29           ` Wink Saville
2007-12-10  3:01             ` Daniel Barkalow
2007-12-10  6:36               ` Wink Saville [this message]
2007-12-10  6:51                 ` Daniel Barkalow
2007-12-10  7:01                   ` Wink Saville
2007-12-10  7:52     ` Alex Riesen
2007-12-10 17:55       ` Wink Saville

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=475CDE73.9010505@saville.com \
    --to=wink@saville.com \
    --cc=barkalow@iabervon.org \
    --cc=git@vger.kernel.org \
    --cc=raa.lkml@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).