0

我正在评估 SubGit,看起来它导入得相当好,除了我们在 SVN 目录中有标准和非标准分支:

- trunk
- tags
- branches
  - test
  - JIRA_89
  - JIRA_92
  - user
    - jim
    - bob

有像branches/testand这样的标准分支branches/JIRA_89,但我们也有一些分支branches/user/jimand branches/user/bob

为 subgit 导入重命名这些用户分支的正确方法是什么?

4

1 回答 1

2

您可以使用此配置

trunk = trunk:refs/heads/master
branches = branches/*:refs/heads/*
branches = branches/users/*:refs/heads/users/*
shelves = shelves/*:refs/shelves/*
tags = tags/*:refs/tags/*

或者如果你想branches/users/jim被翻译成(refs/heads/james和),使用这个配置branches/users/bobrefs/heads/robert

trunk = trunk:refs/heads/master
branches = branches/*:refs/heads/*
branches = branches/users/jim:refs/heads/james
branches = branches/users/bob:refs/heads/robert
branches = branches/users/*:refs/heads/users/*
shelves = shelves/*:refs/shelves/*
tags = tags/*:refs/tags/*

但请注意,在这种情况下branches/jamesbranches/robert如果它们存在,则不会被翻译,因为refs/heads/jamesrefs/heads/robert名称已经被采用(但如果你想翻译它们,你也可以为这些分支添加特殊规则)。

于 2015-03-22T13:05:27.010 回答