subgit - 要在git的主文件夹中组合的svn的trunk和root文件夹

问题描述 投票:0回答:1

下面是我的svn存储库结构

svnrepo

  • 树干
  • 分支机构
  • 标签
  • 文件夹1
  • 文件夹2

我想在git存储库trunk分支中有folder1内容,folder2master,我怎么能用subgit迁移实现这个目的?

gitrepo(主人)

  • 主干内容
  • 文件夹1
  • 文件夹2
git svn subgit
1个回答
0
投票

据我所知,你不想在Git中使用branches /和tags /。在这种情况下,您可以使用以下配置:

trunk = trunk:refs/heads/master
branches = folder1:refs/heads/folder1
branches = folder2:refs/heads/folder2

您可以在branches mapping文章中找到有关主干/分支/标签/货架选项的更多信息。您可以选择添加shelves=shelves/*:refs/shelves/*选项,如果您需要双向转换,并希望在分支中自我合并的情况下将每个Git提交转换为单独的修订。

更新:问题是关于将trunk和几个分支转换为同一个Git分支。我只能提出以下方法:

trunk = :refs/heads/master
includePath = /trunk
includePath = /folder1
includePath = /folder2

它会将项目根目录转换为refs / heads / master,但跳过除这3个目录之外的所有内容。请注意,未跳过的目录仍将从SVN下载,但稍后会在本地丢弃。

这是您原始问题的最接近的解决方案,我不知道更好。

© www.soinside.com 2019 - 2024. All rights reserved.