[英]Migrating from SVN multi-repo to GIT
我是 git-svn bridge 的新手,面临着从 SVN repo 迁移到 GIT 的任务。 SVN 结构看起来真的很糟糕:
root
base
server
core
branch
tags
trunk
webapp
branch
tags
trunk
....
client
core
branch
tags
trunk
....
....
....
作为“有才华的 svn migrate-master”,我执行了git svn clone ..../root
并克隆了整个存储库。 我没有 GIT 可见的分支:
$ git branch -a * master remotes/git-svn
我可以轻松导航到root-base-server-core-branch-my-awesome-branch
,它看起来像普通文件夹。
如何继续 svn2git 对话? 看起来我应该从头开始,但克隆这个邪恶花了一个星期,我不想再等了......
您在该存储库中有多个 svn 项目。 你想在 git 中组合它们吗? 您可能需要考虑为客户端、核心和 web 应用程序创建一个单独的 git 存储库。
查看 git svn clone 的--branches
,它可以使用多个通配符,您可能需要使用那个可怕的 svn 结构。 类似于--branches=*/*/*/*/branch/*
您还可以使用多个--branches
如--branches=coked/out/path/branch/* --branches=totally/messed/up/path/branches/*
从帮助:
-T<trunk_subdir>, --trunk=<trunk_subdir>, -t<tags_subdir>, --tags=<tags_subdir>, -b<branches_subdir>, --branches=<branches_subdir>, -s, --stdlayout These are optional command-line options for init. Each of these flags can point to a relative repository path (--tags=project/tags) or a full url (--tags=https://foo.org/project/tags). You can specify more than one --tags and/or --branches options, in case your Subversion repository places tags or branches under multiple paths. The option --stdlayout is a shorthand way of setting trunk,tags,branches as the relative paths, which is the Subversion default. If any of the other options are given as well, they take precedence.
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.