Search code examples
gitsvngit-svnlegacy

Git svn - one git repo per folder (pull once)


I have a very old svn repository in front of me and need to commit it to git. The issue is that I'm looking for a way to create a git per remote folder.

The basic structure of svn is the following :

  • https://remote-svn/svn/project
  • ------Project1
  • -----------------Branches
  • -------------------------------Branche1
  • -------------------------------Branche2
  • -------------------------------Branche3
  • -----------------Tags
  • -------------------------------Tag1
  • -------------------------------Tag2
  • -------------------------------Tag3
  • -----------------Trunk
  • ------Project2
  • ...
  • ------Project3
  • ...
  • ------Project4
  • ...
  • ------Project5
  • ...

Is is possible to create one git per remote folder with the underlying branches ?


Solution

  • Clone projects one by one:

    git svn clone -s https://remote-svn/svn/project/Project1
    git svn clone -s https://remote-svn/svn/project/Project2
    git svn clone -s https://remote-svn/svn/project/Project3
    …