Importing Subversion to GIT: problem with subpaths

And*_*mar 6 svn git git-svn

We currently run a big subversion repository, and I'm trying to move it to GIT. The problem is that it uses trunks and tags below the root directory. For example:

MyDepartment\MyOS\Project1\trunk\              <-- master branch
MyDepartment\MyOS\Project1\branch\v1           <-- other branch
MyDepartment\MyOS\Project1\tags\v1_20100101    <-- release tag
Run Code Online (Sandbox Code Playgroud)

There are different departments, OS's, and many different projects.

So when I clone the SVN repository using --stdlayout:

git svn clone --stdlayout http://svn-repository/
Run Code Online (Sandbox Code Playgroud)

克隆最终为空.没有选项,我得到一个克隆,但然后分支被视为主分支上的目录.

  1. 有没有办法一次性导入这个目录结构?
  2. 如果我编写一个脚本来单独导入所有项目,有没有办法将每个项目的GIT导入组合到一个大的GIT存储库中?

Bri*_*per 0

查看Git 子模块。您可能需要单独导入每个子项目,但结果可能会更好地反映您当前的使用情况。