Branches\
Project1/
Branch11/
...
Branch1N/
Project2/
Branch21/
ProjectX/ # not anywhere else
Excluded1\
Excluded2\
Excluded3\
Excluded4\
Programs\
Excluded11\
...
Excluded1N\
Project1/ # the main one
Project2/
...
ProjectN/
Tags\
Project1/
Release1/
...
Release69/
排除 我已经排除了 - 但我完全不知道如何将分支/标签映射到git分支/标签 - 最好是在事后(每个克隆需要约5小时)。
请记住,我是SVN的新手 - 我不知道也不理解分支/标记系统。
我在windoz上 - svn2git不是选项(无论如何,我对如何在克隆后或最坏情况下仅使用vanilla git进行此操作感兴趣)
此外,我不打算将其作为永久迁移,它将作为SVN和用于开发的新git存储库之间的桥梁运行 - 因此我希望尽可能保留信息 - 但不超过所需。 在某些时候,它可能会变成永久性 - 那时我将需要过滤掉空提交(对于被排除的项目),我猜是这样的(?)
命令:
$ git svn clone --ignore-paths="^(?:Releases|Projects|Scripts|Games|)/|^Programs/(?:Nif Scanner|Nif Viewer|Raziel23x's Oblivion Toolset|Shader Disasm|Shader Editor)/" --authors-file=authors_with_emails.txt svn://svn.code.sf.net/p/oblivionworks/code/ .
克隆后,我有:
$ git branch -r
git-svn
$ git branch
* master
Branches
文件夹 - 并跟踪它们 - 这个(700 mb)标签目录只是标签 - 你能做些什么(它们不对应提交)?”我没有看到邪恶的主干
我的config
:
[core]
repositoryformatversion = 0
filemode = false
bare = false
logallrefupdates = true
symlinks = false
ignorecase = true
hideDotFiles = dotGitOnly
[svn-remote "svn"]
ignore-paths = ^(?:Releases|Projects|Scripts|Games|)/|^Programs/(?:Nif Scanner|Nif Viewer|Raziel23x's Oblivion Toolset|Shader Disasm|Shader Editor)/
url = svn://svn.code.sf.net/p/oblivionworks/code
fetch = :refs/remotes/git-svn
[svn]
authorsfile = authors_with_emails.txt
[gui]
wmstate = zoomed
geometry = 787x377+54+59 305 1127
[remote "github"]
url = https://github.com/Utumno/wrye_bash_refactoring.git
fetch = +refs/heads/*:refs/remotes/github/*
[branch "master"]
remote = github
merge = refs/heads/master
[svn-remote "svn"]
?他们所指的主干是什么?_这会将“分支”实际压缩到git数据库中并从我的面前消失吗_?如果您查看实际存储库并提供一些示例代码,这将有所帮助(至少对我来说)。您还需要详细说明映射逻辑,我不理解 - 问题在于存储库的结构。添加了配置。 - Mr_and_Mrs_Dgit svn rebase
?根据 这里 的说法,这就是我要做的。这会使我的分支“回到”树吗?另请参见这里 - 这些是fetch
过程中报告的“发现可能的分支点”吗?请稍微更新一下您的答案 - 我将很乐意接受它,但仍然缺乏信息。 - Mr_and_Mrs_DFound possible branch point: svn://svn.code.sf.net/p/oblivionworks/code/Programs/Wrye%20Bash => svn://svn.code.sf.net/p/oblivionworks/code/Branches/Wrye%20Bash/295-fixes, 1667 Initializing parent: refs/remotes/svn-branches/Wrye Bash/295-fixes@1667
,所以我正在尝试让其重新创建树。因为这些分支是“无根”的,我相信有一种方法可以将它们“变基”到主分支上。也许我需要重新克隆?当然,标签也是如此 - 目前大小为700 mb。 - Mr_and_Mrs_D