由git svn clone创建的额外分支

时间:2013-07-28 17:10:05

标签: git svn git-svn

继续previous question我决定继续thing

$ git svn clone --branches=Branches/Wrye\ Bash/* \
--tags=Tags/Wrye\ Bash/* \
--trunk=Programs/Wrye\ Bash/ --prefix=svn/ \ 
--ignore-paths="^(?:Releases|Projects|Scripts|Games|)/|^Programs/\
(?:Nif Scanner|Nif Viewer|Raziel23x's Oblivion Toolset|Shader Disasm|Shader Editor)/" \
--authors-file=authors_with_emails.txt \
svn://svn.code.sf.net/p/oblivionworks/code/ . >> 2013.07.28 2>&1

所以现在我只用它的分支和标签克隆了一个特定的项目

结果:

$ git branch -a
* master
  remotes/svn/291-fixes
  remotes/svn/294.2%20bugfixes
  remotes/svn/294.2-3329021
  remotes/svn/295-3329021
  remotes/svn/295-fixes
  remotes/svn/296-unicode
  remotes/svn/302-fixes
  remotes/svn/dev-sharlikran
  remotes/svn/tags/274
  remotes/svn/tags/276
  remotes/svn/tags/288
  remotes/svn/tags/289
  remotes/svn/tags/290
  remotes/svn/tags/291
  remotes/svn/tags/291.1
  remotes/svn/tags/292
  remotes/svn/tags/293
  remotes/svn/tags/294
  remotes/svn/tags/294.1
  remotes/svn/tags/294.1.test
  remotes/svn/tags/294.2
  remotes/svn/tags/295
  remotes/svn/tags/295.1
  remotes/svn/tags/295.2
  remotes/svn/tags/295.3
  remotes/svn/tags/295.4
  remotes/svn/tags/295.5
  remotes/svn/tags/296
  remotes/svn/tags/297
  remotes/svn/tags/297.1
  remotes/svn/tags/298
  remotes/svn/tags/299
  remotes/svn/tags/300
  remotes/svn/tags/301
  remotes/svn/tags/302
  remotes/svn/tags/302.1
  remotes/svn/tags/302a
  remotes/svn/tags/303
  remotes/svn/tags/304
  remotes/svn/trunk

Branches/Wrye\ Bash/文件夹只包含:

291-fixes
294.2-3329021
295-fixes
302-fixes
dev-sharlikran

那么remotes/svn/294.2%20bugfixesremotes/svn/295-3329021remotes/svn/296-unicode从何而来?

r1947 = 435203c3dc4c8a608e3a33d325afd2013549fd34 (refs/remotes/svn/trunk)
Found possible branch point: svn://svn.code.sf.net/p/oblivionworks/code/Programs/Wrye%20Bash => svn://svn.code.sf.net/p/oblivionworks/code/Branches/Wrye%20Bash/296-unicode, 1947
Found branch parent: (refs/remotes/svn/296-unicode) 435203c3dc4c8a608e3a33d325afd2013549fd34
Following parent with do_switch
Successfully followed parent
r1948 = c5e6069b46f9501478e0f354c9956092be3e407f (refs/remotes/svn/296-unicode)
    M   Mopy/bash_default.ini
# etc

complete log

编辑: 另一个问题:我应该为那些人创建当地分支机构吗? 忘了提一下我现在把它当作git-svn桥,但最终作为一个完整的迁移 - 所以我想尽可能正确地做到这一点

注意我不是在谈论@branches

1 个答案:

答案 0 :(得分:1)

  

那么遥控器/ svn / 294.2%20bugfixes,遥控器/ svn / 295-3329021和遥控器/ svn / 296-unicode从哪里弹出?

来自SVN回购:-)。说真的,这些分支存在于“Branches / Wrye Bash”下,但后来在SVN中被删除了。

如果在SVN存储库中删除了分支,git-svn将不会删除相应的git分支(因为否则分支及其所有[未合并]提交将在git中丢失)。

如果这些分支困扰您,您将不得不手动删除它们。参见例如How can I make git-svn get rid of remote branches that don't exist anymore?

  

编辑:另一个问题:我应该为那些创建本地分支吗?

通常,如果要提交本地分支,则只创建本地分支。所以没有必要提前创建本地分支,一旦你想要它就可以做到。