在subgit中正确映射branches / user / *

时间:2015-03-20 18:31:48

标签: git subgit

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

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

branches/testbranches/JIRA_89等标准分支,但我们还有一些分支branches/user/jimbranches/user/bob

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

1 个答案:

答案 0 :(得分: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名称已被占用(但您也可以如果要翻译它们,请为这些分支添加特殊规则。)