git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Seth Falcon <sethfalcon@gmail.com>
To: git@vger.kernel.org
Subject: Re: git-svn: importing branches later
Date: Tue, 08 May 2007 07:51:10 -0700	[thread overview]
Message-ID: <m2odkv2wtd.fsf@ziti.local> (raw)
In-Reply-To: <20070508085149.GB24409@diana.vm.bytemark.co.uk> (Karl Hasselström's message of "Tue, 8 May 2007 10:51:49 +0200")

Karl Hasselström <kha@treskal.com> 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

  reply	other threads:[~2007-05-08 14:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-07 19:07 git-svn: importing branches later Michael Hendricks
2007-05-08  8:51 ` Karl Hasselström
2007-05-08 14:51   ` Seth Falcon [this message]
2007-05-08 15:34     ` Michael Hendricks

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=m2odkv2wtd.fsf@ziti.local \
    --to=sethfalcon@gmail.com \
    --cc=git@vger.kernel.org \
    /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).