Git Svn clone certain revision, and continue cloning other revisions in the future

I am converting my svn repo to git. It is a very large repo and it keep failing, therefore I have to clone only part of it. I used the following command:

git svn clone -r100000:HEAD .

It completed succesfully, but I only have the latest few commits. Is there anyway to continue cloning the earlier commits?

  • Git - is it pull or rebase when working on branches with other people
  • simplest possible way git can output the number of commits between “branch” and “remotes/origin/branch”
  • How to to disable Git end-of-line (CRLF to LF) across all clones/machines?
  • partly cherry-picking a commit with git
  • How to run a script which can determine whether cmd.exe or gnu mingw shell is running
  • Eclipse “Error: Could not find or load main class”
  • P.S: cloning the entire repo without -r always result in RA layer request failed: REPORT request failed on ‘svn/project/!svn/vcc/default’: … could not read chunk size: Secure connection truncated … Sometimes, it is after a few days… so I decided to abandon it and clone only partially

    EDIT: Add the error message

    RA layer request failed: REPORT request failed on ‘/svn/project/!svn/vcc/default’: REPORT of ‘/svn/project/!svn/vcc/default’: Could not read chunk size: Secure connection truncated ( at /usr/lib/perl5/site_perl/Git/SVN/ line 282

  • Find a specific couple of lines of code from large git repo
  • How to get git-status of a single subfolder?
  • Moving Directories with History
  • How to manage the version number in Git?
  • How to include git changelog in Jenkins emails?
  • Is there a way to force git merge to always use an external merge tool?
  • 2 Solutions collect form web for “Git Svn clone certain revision, and continue cloning other revisions in the future”

    If you want the entire history, why not start at your svn repo’s rev 1? Granted it will take a while, but you could do it in parts. For example:

    git svn clone -r1:10000 .

    Once that completes cd into project and run:

    git svn fetch svn -r10000:20000

    you can even overlap:

    git svn fetch svn -r9997:20000

    and it’ll skip past the pieces it already got. You may just not want to create gaps.

    And I recognize that you’ve tried to pull it all before without any -r spec and got errors, but maybe doing it in sections will get past that. If you do get an error, try running the same command again. In using git svn clone in the past I’ve had many cases of it losing connection or having random errors, but cd-ing into the project and git svn fetch or rebase-ing (sometimes repeatedly) seems to keep picking up where it left off before.

    with git you cannot add history “in front of” what you already have. every git commit references ALL COMMITS EVER that it is a successor to (via inclusion of a hash of these commits). it is possible to rewrite history (and add new commits in front), but that gives you totally new commits (changed hashes) and is not what you want to do in an actively used repo.

    you should either grab as much history as you can and claim it an “initial import”, or try to fix the import problem. when you talk about days, it sounds as if you could benefit from moving closer to the svn repo, i.e. run the commands on the svn server itself to spare network overhead/latency.

    also it might help to give more information about the actual errors you encounter.

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