# git-svn: multiple branches directories

4 messages from 2008-06-08 to 2008-06-08. Participants: Tzafrir Cohen, Steven Walter, Björn Steinbrink.
Thread: https://gitlist.dev/t/13857

## Tzafrir Cohen, 2008-06-08 00:23

Subject: git-svn: multiple branches directories
Message-ID: <20080608002349.GB23243@xorcom.com>
URL: https://gitlist.dev/e/20080608002349.GB23243%40xorcom.com

```
Hi

Does git-svn support a repository layout where branches may reside under
more than one root?

/trunk
/branches
  branch1
  branch2
  branch3
/somedir
  branch4
  branch5
  branch6
/tags
  ...

-- 
               Tzafrir Cohen
icq#16849755              jabber:tzafrir.cohen@xorcom.com
+972-50-7952406           mailto:tzafrir.cohen@xorcom.com
http://www.xorcom.com  iax:guest@local.xorcom.com/tzafrir

```

## Steven Walter, 2008-06-08 16:00

Subject: Re: git-svn: multiple branches directories
Message-ID: <e06498070806080900x4ecd730byefedf88aa4feee5e@mail.gmail.com>
URL: https://gitlist.dev/e/e06498070806080900x4ecd730byefedf88aa4feee5e%40mail.gmail.com
In-Reply-To: <20080608002349.GB23243@xorcom.com>

```
On Sat, Jun 7, 2008 at 8:23 PM, Tzafrir Cohen <tzafrir.cohen@xorcom.com> wrote:
> Hi
>
> Does git-svn support a repository layout where branches may reside under
> more than one root?
>
> /trunk
> /branches
>  branch1
>  branch2
>  branch3
> /somedir
>  branch4
>  branch5
>  branch6
> /tags
>  ...

git-svn does support it.  The way that I interact with repositories
like this is to have the main git-svn remote track only the trunk
(fetch = /trunk:...), and then to add addititonal remotes for each
branch that I want to track.  There may be a nicer way to do it, but
git-svn certainly supports the method just described.
-- 
-Steven Walter <stevenrwalter@gmail.com>
"A human being should be able to change a diaper, plan an invasion,
butcher a hog, conn a ship, design a building, write a sonnet, balance
accounts, build a wall, set a bone, comfort the dying, take orders,
give orders, cooperate, act alone, solve equations, analyze a new
problem, pitch manure, program a computer, cook a tasty meal, fight
efficiently, die gallantly. Specialization is for insects."
 -Robert Heinlein

```

## Tzafrir Cohen, 2008-06-08 18:37

Subject: Re: git-svn: multiple branches directories
Message-ID: <20080608183742.GF23243@xorcom.com>
URL: https://gitlist.dev/e/20080608183742.GF23243%40xorcom.com
In-Reply-To: <e06498070806080900x4ecd730byefedf88aa4feee5e@mail.gmail.com>

```
On Sun, Jun 08, 2008 at 12:00:58PM -0400, Steven Walter wrote:
> On Sat, Jun 7, 2008 at 8:23 PM, Tzafrir Cohen <tzafrir.cohen@xorcom.com> wrote:
> > Hi
> >
> > Does git-svn support a repository layout where branches may reside under
> > more than one root?
> >
> > /trunk
> > /branches
> >  branch1
> >  branch2
> >  branch3
> > /somedir
> >  branch4
> >  branch5
> >  branch6
> > /tags
> >  ...
> 
> git-svn does support it.  The way that I interact with repositories
> like this is to have the main git-svn remote track only the trunk
> (fetch = /trunk:...), and then to add addititonal remotes for each
> branch that I want to track.  There may be a nicer way to do it, but
> git-svn certainly supports the method just described.

Thanks for your answer,

I'm afraid I don't follow you. Where do I have to write that and where?

-- 
               Tzafrir Cohen
icq#16849755              jabber:tzafrir.cohen@xorcom.com
+972-50-7952406           mailto:tzafrir.cohen@xorcom.com
http://www.xorcom.com  iax:guest@local.xorcom.com/tzafrir

```

## Björn Steinbrink, 2008-06-08 18:51

Subject: Re: git-svn: multiple branches directories
Message-ID: <20080608185140.GA31698@atjola.homenet>
URL: https://gitlist.dev/e/20080608185140.GA31698%40atjola.homenet
In-Reply-To: <20080608183742.GF23243@xorcom.com>

```
On 2008.06.08 21:37:42 +0300, Tzafrir Cohen wrote:
> On Sun, Jun 08, 2008 at 12:00:58PM -0400, Steven Walter wrote:
> > On Sat, Jun 7, 2008 at 8:23 PM, Tzafrir Cohen <tzafrir.cohen@xorcom.com> wrote:
> > > Hi
> > >
> > > Does git-svn support a repository layout where branches may reside under
> > > more than one root?
> > >
> > > /trunk
> > > /branches
> > >  branch1
> > >  branch2
> > >  branch3
> > > /somedir
> > >  branch4
> > >  branch5
> > >  branch6
> > > /tags
> > >  ...
> > 
> > git-svn does support it.  The way that I interact with repositories
> > like this is to have the main git-svn remote track only the trunk
> > (fetch = /trunk:...), and then to add addititonal remotes for each
> > branch that I want to track.  There may be a nicer way to do it, but
> > git-svn certainly supports the method just described.
> 
> Thanks for your answer,
> 
> I'm afraid I don't follow you. Where do I have to write that and where?

You can just add more svn-remote to a single git repo with "git svn
init". So you could do:

git svn clone -s svn://host/some/repo
cd repo
git svn init --branches somedir svn://host/some/repo/ svn2
git svn fetch svn2

To fetch all new stuff at once, you would then later use "git svn fetch
--all".

Björn

```
