Git-SVN有多个分支位置? [英] Git-SVN with multiple branch locations?
问题描述
- branches / release_1_0_x
- branches / release_1_1_x
- branches / work / dave / topic_one
- branches / work / tom / topic_two
- branches / work / something_else
现在我该如何让git-svn将所有这些(以及更多)识别为单独的分支?看起来 git svn init
只接受一个分支位置,我怎么调用它。
编辑:这是我如何初始化git repo:
git svn clone -s --prefix = svn / http://svn.company.com/product/
根据另一个问题的答案,您的最好的选择是使用Git 1.6.x并利用深层克隆。
如果您无法升级到1.6.x,那么您可以指定多个分支当你克隆。
git svn clone -s --prefix = svn / -b branches -b branches / work / dave - b branch / work / tom ...
您只需确保您添加了info在添加新用户分支后,在git svn fetch之前添加.git / config的新用户。
Our company subversion repo is a bit tricky: We've got a basic "default" layout with trunk, tags and branches. However, inside the branches, we have a "work" directory which contains more branches. Something like this:
- branches/release_1_0_x
- branches/release_1_1_x
- branches/work/dave/topic_one
- branches/work/tom/topic_two
- branches/work/something_else
Now how can I get git-svn to recognize all those (and a few more) as separate branches? It appears git svn init
only accepts one branch location, how ever I'm invoking it.
Edit: this is how I initialized the git repo:
git svn clone -s --prefix=svn/ http://svn.company.com/product/
According to the answer to another question, your best bet is to use Git 1.6.x and take advantage of "deep cloning".
If you can't upgrade to 1.6.x, then you can specify multiple branches when you clone.
git svn clone -s --prefix=svn/ -b branches -b branches/work/dave -b branches/work/tom ...
You'll just have to make sure you add info for new users to your .git/config before "git svn fetch"ing when a new user branch has been added.
这篇关于Git-SVN有多个分支位置?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!