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 https://svn.myserver.com/project/ .

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

  • Git: how to overcome file structure restrictions?
  • How can I find out which files have been modified in a branch?
  • How to use git filter.gitignore.clean to filter both branches during a diff
  • Reauthenticate git (force creating new SSH key for a new user)
  • git doesn't auto commit when I pull
  • Bash shell is not taking the arguments in a way I would expect?
  • 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 (https://svn.myserver.com) at /usr/lib/perl5/site_perl/Git/SVN/Ra.pm line 282

  • getting “fatal: not a git repository: '.'” when using post-update hook to execute 'git pull' on another repo
  • I deleted the known_hosts file from .ssh folder and I can't pull or push in BitBucket repositories
  • “Un-reverting” a forced git push
  • Move bonobo git server repositories to another drive
  • Merge conflicts updating from upstream
  • Can I ignore the global .gitignore?
  • 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 https://svn.myserver.com/project/ .
    

    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.