Git-SVN有多个分支位置? [英] Git-SVN with multiple branch locations?

查看:162
本文介绍了Git-SVN有多个分支位置?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们的公司颠覆回购有点棘手:我们已经有了一个基本的默认布局,主干,标签和分支。但是,在分支机构内部,我们有一个包含更多分支的工作目录。像这样:


  • 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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆