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

git-svn clone on a central server

From
BHBruno Harbulot <bruno.harbulot@manchester.ac.uk>
Date
Mar 15, 2008, 19:38 UTC
Message-ID
<frh8k1$lc8$1@ger.gmane.org>
Hello,

I'm trying to follow example 3 of the git-svn manpage, since I'd like to keep a "central" clone of a subversion repository (and rebase it regularly) on a server and work on local git repositories based on that server's git repository. However, I can't get this example to work:

# Do the initial import on a server
    ssh server "cd /pub && git-svn clone http://svn.foo.org/project
# Clone locally - make sure the refs/remotes/ space matches the server
    mkdir project
    cd project
    git-init
    git remote add origin server:/pub/project
    git config --add remote.origin.fetch=+refs/remotes/*:refs/remotes/*
    git fetch
# Initialize git-svn locally
    git-svn init http://svn.foo.org/project
# Pull the latest changes from Subversion
    git-svn rebase
('--add' doesn't work in git config, but I guess that's not required).
I get this error:

$ git-svn rebase fatal: ambiguous argument 'HEAD': unknown revision or path not in the working tree. Use '--' to separate paths from revisions log --no-color HEAD: command returned error: 128

I've then tried:

$ git checkout origin/master warning: You appear to be on a branch yet to be born. [...] $ git branch master $ git checkout master $ git-svn rebase

However, this produces this error: 'Unable to determine upstream SVN information from working tree history'

Any idea how to solve this?
Best wishes,
Bruno.
Next: Peter Harris
Message 1 of 4 in “git-svn clone on a central server”
  1. Bruno HarbulotMar 15, 2008
  2. Peter HarrisMar 15, 2008
  3. Bruno HarbulotMar 16, 2008
  4. Peter HarrisMar 17, 2008

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.