how to use nested branches through git-svn

前提是你 提交于 2019-12-04 05:10:59
VonC

As mentioned in "How do I import svn branches rooted in different directories into git using git-svn?", you need to grab all the nested branch during the initial import:

[svn-remote "svn"]
    url = svn://svnserver/repo
    fetch = trunk:refs/remotes/trunk
    branches = branches/*/*:refs/remotes/*
    tags = tags/*:refs/remotes/tags/*

That is also described in this thread.
For even more complex SVN branch layout (like branches within trunk!), a modification of the SVN repo might be in order first, before putting in place a git-svn integration.

Since Git1.6, "1.6.x offers deep cloning so that multiple wildcards can be used with the --branches option", as mentioned in "Cloning a Non-Standard Svn Repository with Git-Svn".

git svn clone https://svn.myrepos.com/myproject web-self-serve --trunk=trunk --branches=branches/*/* --prefix=svn/
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!