Git development
 help / color / mirror / Atom feed
From: Michael J Gruber <git@drmicha.warpmail.net>
To: Svenn Are Bjerkem <svenn.bjerkem@googlemail.com>
Cc: git@vger.kernel.org
Subject: Re: After git svn clone master is tied to a branch in svn, howto set    master to trunk
Date: Wed, 11 Mar 2009 17:32:59 +0100	[thread overview]
Message-ID: <49B7E7BB.2090803@drmicha.warpmail.net> (raw)
In-Reply-To: <09fb20f5-3722-49d4-9565-95a5b41d15ac@c36g2000yqn.googlegroups.com>

Svenn Are Bjerkem venit, vidit, dixit 11.03.2009 16:17:
> Hi,
> after performing a
> $> git svn clone https://svnserver/svn/a/b/c -T trunk/current -t tags -
> b branches
> I find that the git master has been tied to one of the branches. It
> turns out that the highest svn revision number in the repository was
> tied to that branch.
> 
> For historical reasons we have subdirectories in trunk/ on svn, but I
> inspected .git/config
> [svn-remote "svn"]
>         url = https://svnserver/svn
>         fetch = a/b/c/trunk/current:refs/remotes/trunk
>         branches = a/b/c/branches/*:refs/remotes/*
>         tags = a/b/c/tags/*:refs/remotes/tags/*
> And I assume it picked up the strange trunk correctly.
> 
> I have been googling around for a while looking for instructions how
> to tell git that when I check out "master" it should be "trunk" from
> svn and not "branches/next_gen", or more precisely how to move master
> to trunk from branches/next_gen.
> 
> I guess I could solve the problem by modifying a file in trunk on svn
> and commit so that the trunk will get the highest svn revision number
> again and redo the clone.

I'm not quite sure what you mean by master being "tied" to an svn
branch. You mean you want master to track the svn trunk? Then

git branch -D master
git checkout --track -b master trunk

should do (assuming you haven't worked on master yet).

Michael

  parent reply	other threads:[~2009-03-11 16:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-11 15:17 After git svn clone master is tied to a branch in svn, howto set master to trunk Svenn Are Bjerkem
2009-03-11 16:04 ` Svenn Are Bjerkem
2009-03-11 16:32 ` Michael J Gruber [this message]
2009-03-11 17:20   ` Svenn Are Bjerkem
2009-03-11 17:54     ` Svenn Are Bjerkem

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=49B7E7BB.2090803@drmicha.warpmail.net \
    --to=git@drmicha.warpmail.net \
    --cc=git@vger.kernel.org \
    --cc=svenn.bjerkem@googlemail.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