Re: git-svn questions: how to clone/init non-standard layout branches/tags?
- From
- Luke Lu <git@vicaya.com>
- Date
- Nov 3, 2007, 20:41 UTC
- Message-ID
- <8644CD78-25F0-42C4-A163-BD88528594F3@vicaya.com>
- In-Reply-To
- <8c5c35580711031332y4018dba6y5d24965ebf2fbefb@mail.gmail.com>
On Nov 3, 2007, at 1:32 PM, Lars Hjemli wrote:
Show 38 quoted lines
> On Nov 3, 2007 9:01 PM, Luke Lu <git@vicaya.com> wrote: >> On Nov 3, 2007, at 6:59 AM, Lars Hjemli wrote: >>> On Nov 3, 2007 11:56 AM, Benoit SIGOURE <tsuna@lrde.epita.fr> wrote: >>>> On Nov 3, 2007, at 9:19 AM, Luke Lu wrote: >>>>> 2. Is there a way to add a new svn branch like that (say >>>>> production >>>>> or some_branch) to an existing git-svn repository that has trunk >>>>> cloned? >>>> >>>> I don't know, but that'd be great indeed. >>>> >>> >>> You can simply add "fetch" lines to the relevant "svn-remote" >>> section >>> in .git/config. >> >> I did try to add a "fetch" line for the production branch like this: >> >> [svn-remote "svn"] >> url = svn+ssh://host/svn/project >> fetch = production:refs/remotes/svn-prod >> fetch = trunk:refs/remotes/git-svn >> >> which is modeled after http://lists-archives.org/git/420712-git-svn- >> remote-tracking-branch-question.html >> >> But when I try to checkout the production branch like this: >> >> git checkout -b prod remotes/svn-prod >> >> I got this: >> git checkout: updating paths is incompatible with switching branches/ >> forcing >> Did you intend to checkout 'remotes/svn-prod' which can not be >> resolved as commit? > > Did you forget to run 'git svn fetch' after modifying your .git/ > config?
Yes, I did. It didn't seem to do anything. $? is 0. the master/trunk is up-to-date but the production branch has never been fetched. If this is supposed to work, the fetch might be triggered upon next update in trunk?
__Luke