我是一个完整的git新手,我想用git-svn克隆我的svn存储库。但是,在运行克隆命令后,分支将丢失。
回购计划的布局如下:
trunk/
branches/team/releases/release-1
branches/team/releases/release-2
...
branches/development/user1/feature1
branches/development/user1/feature2
branches/development/user2/feature3
branches/development/user2/feature4
...
tags/release1
tags/release2我使用的命令是:
git svn clone --trunk=/trunk --branches=branches/*/* --tags=tags/*/* --prefix=svn/ --authors-file=authors.txt <my-repo> <git-repo-name>我尝试将分支选项修改为/branches/development/user1/*和/branches/development/user1/*/* (同时也使用这两种方法),并再次运行clone命令,以查看是否有其他分支被选中,但它们没有。
是否可以再次运行clone ,还是必须从头开始并删除git??
如果我在克隆后运行git branch -r,我所能看到的就是:
svn/development/user1
svn/development/user1
svn/team/releases
svn/trunk
note that all the tags are present but omitted for brevity我怎么才能得到丢失的树枝?
发布于 2015-10-21 15:15:16
您可以多次指定--分支标记。从医生那里
这些是init的可选命令行选项。每个标记都可以指向一个相对存储库路径(-标记=项目/标记)或一个完整的url (--tag=https://foo.org/project/tags)。您可以指定多个-标记和/或-分支选项,以防您的Subversion存储库将标记或分支放置在多条路径下。选项-stdlayout是将主干、标记、分支设置为相对路径的一种速记方式,这是Subversion的默认设置。如果给出了任何其他选项,则优先考虑。
在你的例子中,试着:
git svn clone \
--branches=branches/team/releases/* \
--branches=branches/development/user1/* \
--branches=branches/development/user2/* \...etc。
可以再次运行克隆吗?还是我必须从头开始删除git??
一般来说,你应该白手起家。该工具不应是更新脚本。
https://stackoverflow.com/questions/33258096
复制相似问题