git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: git-svn questions: how to clone/init non-standard layout branches/tags?

From
LHLars Hjemli <hjemli@gmail.com>
Date
Nov 3, 2007, 20:32 UTC
Message-ID
<8c5c35580711031332y4018dba6y5d24965ebf2fbefb@mail.gmail.com>
In-Reply-To
<C81F0AB6-ED04-405F-AA29-CD72816FB7B9@vicaya.com>
On Nov 3, 2007 9:01 PM, Luke Lu <git@vicaya.com> wrote:
Show 32 quoted lines
> 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?

-- larsh

Previous: Luke LuNext: Luke Lu
Message 5 of 9 in “git-svn questions: how to clone/init non-standard layout branches/tags?”
  1. Luke LuNov 3, 2007
  2. Benoit SIGOURENov 3, 2007
  3. Lars HjemliNov 3, 2007
  4. Luke LuNov 3, 2007
  5. Lars HjemliNov 3, 2007
  6. Luke LuNov 3, 2007
  7. Lars HjemliNov 3, 2007
  8. Luke LuNov 3, 2007
  9. Luke LuNov 7, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.