# How do I..?

3 messages from 2008-12-17 to 2008-12-17. Participants: Dylan Martin, Peter Harris, Miklos Vajna.
Thread: https://gitlist.dev/t/16774

## Dylan Martin, 2008-12-17 23:16

Subject: How do I..?
Message-ID: <e1a4c7f60812171516h7b7bb1fem35dfc6f30747a740@mail.gmail.com>
URL: https://gitlist.dev/e/e1a4c7f60812171516h7b7bb1fem35dfc6f30747a740%40mail.gmail.com

```
Sorry if this is a dumb question.  I've poked around the docs and
tried the google searches I could think of, but I don't even know what
kind of search terms one would use in trying to answer this.

I'm a sysadmin and I've got a big monolithic git repo of all my
scripts, documents, etc...  It used to be a CVS repo but I converted
it to git a while ago.
Before I switched to git, I played around with SVN a bit, and started
a few tiny SVN repos for various scripts I was working on.  So, I know
have one git repo with %90 of my stuff and a handful of SVN repos.
I'd like to be able to add the SVN repos as subdirectories inside my
git repo.  I've found lots of pages describing how to convert an SVN
repo into a _new_ git repo, but I haven't found anything yet about
importing the contents of an SVN repo as a subdirectory of an
_existing_ git repo.

-Thanks!
Dylan

```

## Peter Harris, 2008-12-17 23:44

Subject: Re: How do I..?
Message-ID: <eaa105840812171544i53e8a751s70ad495bb6a86160@mail.gmail.com>
URL: https://gitlist.dev/e/eaa105840812171544i53e8a751s70ad495bb6a86160%40mail.gmail.com
In-Reply-To: <e1a4c7f60812171516h7b7bb1fem35dfc6f30747a740@mail.gmail.com>

```
On Wed, Dec 17, 2008 at 6:16 PM, Dylan Martin wrote:
> Before I switched to git, I played around with SVN a bit, and started
> a few tiny SVN repos for various scripts I was working on.  So, I know
> have one git repo with %90 of my stuff and a handful of SVN repos.
> I'd like to be able to add the SVN repos as subdirectories inside my
> git repo.  I've found lots of pages describing how to convert an SVN
> repo into a _new_ git repo, but I haven't found anything yet about
> importing the contents of an SVN repo as a subdirectory of an
> _existing_ git repo.

You could convert each SVN repo into its own temporary git repo, then
use the subtree merge strategy to combine the git trees:
http://www.kernel.org/pub/software/scm/git/docs/howto/using-merge-subtree.html

Peter Harris

```

## Miklos Vajna, 2008-12-17 23:49

Subject: Re: How do I..?
Message-ID: <20081217234927.GM5691@genesis.frugalware.org>
URL: https://gitlist.dev/e/20081217234927.GM5691%40genesis.frugalware.org
In-Reply-To: <e1a4c7f60812171516h7b7bb1fem35dfc6f30747a740@mail.gmail.com>

```
On Wed, Dec 17, 2008 at 03:16:59PM -0800, Dylan Martin <dmartin@sccd.ctc.edu> wrote:
> Sorry if this is a dumb question.  I've poked around the docs and
> tried the google searches I could think of, but I don't even know what
> kind of search terms one would use in trying to answer this.
> 
> I'm a sysadmin and I've got a big monolithic git repo of all my
> scripts, documents, etc...  It used to be a CVS repo but I converted
> it to git a while ago.
> Before I switched to git, I played around with SVN a bit, and started
> a few tiny SVN repos for various scripts I was working on.  So, I know
> have one git repo with %90 of my stuff and a handful of SVN repos.
> I'd like to be able to add the SVN repos as subdirectories inside my
> git repo.  I've found lots of pages describing how to convert an SVN
> repo into a _new_ git repo, but I haven't found anything yet about
> importing the contents of an SVN repo as a subdirectory of an
> _existing_ git repo.

I would convert each repo to git, then merge them using subtree merge.
See Documentation/howto/using-merge-subtree.txt.

```
