How do I continue pulling from subversion from a git clone which was not originally pointing to svn

Given I have created a git repo on machine1 by pointing to svn with git svn clone --trunk=http://foo/project
And I keep pulling in new revisions from svn on machine1 with ‘git svn rebase’
When I clone the git repo from machine1 to machine2
How do I repoint to svn my git repo on machine2 ???

So far I have done this:
Given I have repointed to svn with git svn init --trunk=http://foo/project on machine2
When I do ‘git svn rebase’
Then nothing happens, prompt just hangs.

  • git push to remote, but don't create new branch
  • How do I reset a Heroku git repository to its initial state?
  • How do I stop git bisect?
  • Remove unused assets from git history
  • pip: pulling updates from remote git repository
  • git merge origin master “Already up-to-date”
  • When I do ‘git svn fetch’
    Then git wants to reimport all of svn revisions as if it’s brand new and that takes me 2 hours, but after that git svn rebase works fine.

    When I do ‘git svn fetch -r XXX’ where XXX is the last svn revision id visible in last commit then I get some files from svn but after that git svn rebase just hangs and nothing happens.

    I am looking for a procedure to repoint to a subversion trunk to keep pulling in new changes. I do not plan to commit back to SVN at all.

    Any ideas?

    My env setup:
    git-svn version (svn 1.6.17)
    git version
    on linux mint 13

  • Why cannot add a large file to a Git repository
  • How to upload images to GitHub without gimmicks (on a Mac)?
  • username and pass required in “git push appengine master”
  • migrate svn to git with svn external
  • Git shows no merge conflicts when it should
  • Why isn't my .npmignore overriding .gitignore on npm publish?
  • 2 Solutions collect form web for “How do I continue pulling from subversion from a git clone which was not originally pointing to svn”

    on machine2
    git svn init --trunk=http://foo/project
    Ready to fetch from Subversion?
    Not yet. We need metadata for the relationship between git commit and svn revision.
    Find out the last commit SHA1 that has svn revision git show or git log -1

    And write SHA1 to .git/refs/remotes/trunk

    echo <SHA1> > .git/refs/remotes/trunk

    Now you can git svn fetch (git will rebuild rev map on first try (5 minutes maybe)).

    The above worked for me on a branch git repo used to pull the latest updates form svn.

    You can set up your local repository to have svn and the remote knowing that they are pointing to the same commits.

    When you run (on machine2)

    git svn init --trunk=http://foo/project

    svn doesn’t know that the repository it is pointing to is the same as the one you pulled from machine1.

    To let git svn know that this is the case, you can use a prefix:

    git svn init --prefix=origin/ --trunk=http://foo/project

    (The trailing slash is important if you are going to use branches)

    If you have already run the first init command, you can get the same result by editing your .git/config file to look like:

    [svn-remote "svn"]
        fetch = http://foo/project:refs/remotes/origin/trunk

    note the origin/ before trunk. If you don’t want to edit the file manually, you can run:

    git config --replace svn-remote.svn.fetch http://foo/project:refs/remotes/origin/trunk

    Which will insert the line for you.

    After doing this, you should be able to run git svn fetch and git will update your rev map.

    Git Baby is a git and github fan, let's start git clone.