Re: git-svn: importing branches later

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Karl Hasselström <kha@xxxxxxxxxxx> writes:

> On 2007-05-07 13:07:06 -0600, Michael Hendricks wrote:
>
>> Now I want to import the 'foo' branch from the same SVN repo without
>> grabbing all the branches. Any suggestions?
>
> I seem to recall that just adding another "fetch" line to the git-svn
> configuration in .git/config will do this for you.

Yes, this should work.  As long as you started out with a fairly
recent git (sorry, I don't know how recent is needed) you should have
in your repository a git/config file containing something like:

    [svn-remote "svn"]
    	url = http://main.svn.url.com/
    	fetch = trunk:refs/remotes/git-svn
    	fetch = branches/b1:refs/remotes/b1  <-- this line added by you

Then a 'git svn fetch' should pull it all down and you can checkout
the branch using 'git checkout -b myb1 remotes/b1'.  At this point,
'git svn rebase' is smart enough to know where the branch comes from.

What may not work when you add branches in this way is that the
history may not connect with the actual branch commit in svn.  I'm
fairly sure there is some way to fix that, but I haven't done it.

+ seth
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux