1

嗨,我对 SubGit 版本 3.2.1 ('Bobique') build #3593 有疑问。

要导入的 svn 存储库没有标准布局。

我找不到仅为主干和与主干同一级别的一个特定分支配置“subgit 导入”的文档。分支不在分支文件夹中。

换句话说..

在 svn 中,我们得到了一个应该映射到 master 的主干。在 svn 中,我们有分支 x,它应该映射到开发。

我希望我已经清楚了。有谁能够帮我?

问候

4

1 回答 1

1

首先你可以运行

$ subgit configure --svn-url PROJECT_ROOT repo.git

然后根据以下条件编辑 repo.git/subgit/config 。如果您想要持续同步,您是否希望翻译其他分支(例如,当有人推送 refs/heads/new 分支时,是否应该将其翻译为 SVN)?如果是,您应该具有以下配置:

trunk = trunk:refs/heads/master
branches = x:refs/heads/develop
branches = *:refs/heads/*
#it's up to you whether you want to have tags/shelves or not
#shelves = shelves/*:refs/shelves/*
#tags = tags/*:refs/tags/*

如果否,您可以仅指定某个分支:

trunk = trunk:refs/heads/master
branches = x:refs/heads/develop
#it's up to you whether you want to have tags/shelves or not
#shelves = shelves/*:refs/shelves/*
#tags = tags/*:refs/tags/*

在第二种情况下,当您推送 refs/heads/branch 时,SubGit 将忽略它。如果只需要一次翻译,两种配置都是一样的。

最后,运行

$ subgit install repo.git

如果您不需要持续同步,则可以运行

$ subgit uninstall repo.git
于 2016-08-10T10:13:48.417 回答