简体   繁体   English

确定 SVN 存储库布局以将其迁移到 Git

[英]Determining SVN repo layout to migrate it to Git

I am trying to migrate a bunch of SVN repos to GitHub.我正在尝试将一堆 SVN 存储库迁移到 GitHub。 It is important for the client to keep his history since it contains important intellectual property information.客户保留其历史记录很重要,因为它包含重要的知识产权信息。 I am at the stage on my test repo where I have to git svn clone the repository but the SVN is not in the standard layout and I can't for the life of me determine how the layout is related to the required trunks, branches and tags.我在我的测试存储库的阶段,我必须git svn clone存储库,但 SVN 不在标准布局中,我无法与我的生活、分支和主干的布局相关标签。

The root of the repo looks like this: repo 的根目录如下所示:

SVN 根

The statmod folder has the most in it and looks like this: statmod文件夹中的内容最多,如下所示:

statmod 文件夹

I'm going insane trying to get this to work.我要疯了,试图让它工作。

It looks like the directories listed in / are the branches.... so, try this:看起来/中列出的目录是分支....所以,试试这个:

git init . # work on a branch new git repo
git svn init --branches=/ path-to-statmod
# the previous command assumes that the repo is the path that provided the first list that you gave us (and so --branches points to its root, so that you get 4 branches)
git svn fetch

And wait paciently.并耐心等待。

A little explanation: --branches tells git svn a directory in the svn repo where each one of its subdirectories is a branch.稍微解释一下: --branches告诉 git svn svn repo 中的一个目录,其中每个子目录都是一个分支。 It looks like the first list there has the 4 branches in the project.看起来第一个列表在项目中有 4 个分支。 Can you confirm if that's the case by looking at the content of another branch, like new ?您能否通过查看另一个分支的内容来确认是否是这种情况,例如new

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM