git - SVN 到 git 的转换:分支形成
问题描述
我的 SVN 存储库如下所示:
branches/
tags/
trunk/
在分支文件夹中,我有以下内容:
branches/dev1/example1
branches/dev2/example2
branches/dev3/example3
我想在转换期间制作example1
,example2
并example3
作为 git 分支。
git svn clone https://myurl -T trunk -b branches/dev1/example1 -b branches/dev2/example2 -b branches/dev3/example3 -t tags -A authors-transform.txt
我正在进入 linux 中的无限循环。如果我不提供不同分支的选项而只给出-b branches
任何人都可以建议一种在 git 转换期间制作分支的方法吗?
解决方案:
git svn clone https://myurl -T trunk -b branches/dev1 -b branches/dev2 -b branches/dev3 -t tags -A authors-transform.txt
解决方案
你很近!
git svn clone https://myurl -T trunk -b branches -t tags -A authors-transform.txt
Option接受一个目录并将-b
那里的每个子目录(dev1
,在您的情况下)视为一个分支。您不需要列出所有分支,只需通过.dev2
dev3
-b branches
-T trunk -b branches -t tags
可简写为-s
or --stdlayout
:
git svn clone https://myurl -s -A authors-transform.txt
推荐阅读
- html - 如何修复引导程序不透明度?
- c++ - 我可以 automoc 继承 QObject 的仅标头对象吗?
- java - JFoenix 库中日期字段的 JFXTreeTableColumn 问题
- wiremock - 可以将wiremock json存根设置为在命中端点时运行我自己的脚本吗?
- c# - C# 进度条在下载时不更新
- c# - Visual Studio 如何确定项目的 C# 版本以及它存储在哪里?
- linkedin - 如何获取具有 r_ads_gen_automation 权限的 OAuth 2.0 访问令牌以访问公司页面的 LinkedIn 潜在客户?
- java - 在我的应用程序中执行命令
- java - Appium Desktop 1.6.1> IOS> java: running desired capabilities gives bad
- c++ - Boost asio async_receive/write don`t receive/send package correctly. after 0x00 will write 0xfe