简体   繁体   English

将svn repo迁移到git。 svn repo中的多个应用程序需要分解为单独的git repos

[英]Migrating a svn repo to git. Multiple app in svn repo need to broken into separate git repos

I have a svn repo with various apps as subdirectory of a single svn repo. 我有一个svn repo与各种应用程序作为单个svn repo的子目录。 That worked because I could have checked out a partial, repo. 这是有效的,因为我可以检查出部分回购。 As I cant do that with git obviously I need multiple repos. 因为我不能用git这样做,显然我需要多个回购。 I want to keep my commit histories in the git export. 我想将我的提交历史记录保存在git导出中。 What is the simplest way to do this? 最简单的方法是什么?

You dont need to specify the root directory for cloning. 您不需要指定克隆的根目录。 You can do it like this: 你可以这样做:

git svn clone svn://repository/subdirectory_of_app1 app1
git svn clone svn://repository/subdirectory_of_app2 app2
...

If you have trunk/branches/tags folders in each of the app folders, you can also add additional arguments: 如果每个app文件夹中都有trunk / branches / tags文件夹,还可以添加其他参数:

git svn clone svn://repository/subdirectory_of_app1 -T trunk -t tags -b branches app1
...

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM