如何从多个文件夹导入标签?
How to import tags from multiple folders?
我在大型旧存储库上成功执行了 subgit import
。
后来我发现,标签有两个目录:default tags
和 tag
.
我尝试根据 Does subgit support multiple 'branches' directories?
中的建议编辑 subgit 配置文件
目前我的标签配置如下:'
tags = tags/*:refs/tags/*
tags = tag/*:refs/tags/tag/*
但是现在当我尝试再次执行导入命令时,Subgit 什么也没做,好像一切都已经是最新的了。我做错了什么或者我需要从头开始 运行 subgit import
?
确实,您必须从头开始导入。你可以运行
$ subgit configure --svn-url SVN_URL repo.git
然后编辑 repo.git/subgit/config 以指定
tags = tags/*:refs/tags/*
tags = tag/*:refs/tags/tag/*
然后
$ subgit install repo.git
最后
$ subgit uninstall repo.git
停止连续同步。您还可以使用 "subgit import" 命令作为 "subgit install" + "subgit uninstall".
的快捷方式
作为奖励,您将在 refs/svn/map 参考中保存所有 SVN 修订号。要在 "git log" 输出中查看修订号,您可以按照 SubGit book 或 运行 中的建议设置您的 Git 客户端,在服务器上执行以下命令:
$ git update-ref refs/notes/commits refs/svn/map
我在大型旧存储库上成功执行了 subgit import
。
后来我发现,标签有两个目录:default tags
和 tag
.
我尝试根据 Does subgit support multiple 'branches' directories?
中的建议编辑 subgit 配置文件目前我的标签配置如下:'
tags = tags/*:refs/tags/*
tags = tag/*:refs/tags/tag/*
但是现在当我尝试再次执行导入命令时,Subgit 什么也没做,好像一切都已经是最新的了。我做错了什么或者我需要从头开始 运行 subgit import
?
确实,您必须从头开始导入。你可以运行
$ subgit configure --svn-url SVN_URL repo.git
然后编辑 repo.git/subgit/config 以指定
tags = tags/*:refs/tags/*
tags = tag/*:refs/tags/tag/*
然后
$ subgit install repo.git
最后
$ subgit uninstall repo.git
停止连续同步。您还可以使用 "subgit import" 命令作为 "subgit install" + "subgit uninstall".
的快捷方式作为奖励,您将在 refs/svn/map 参考中保存所有 SVN 修订号。要在 "git log" 输出中查看修订号,您可以按照 SubGit book 或 运行 中的建议设置您的 Git 客户端,在服务器上执行以下命令:
$ git update-ref refs/notes/commits refs/svn/map