2

抱歉,如果这个问题是重复的,或者我错过了一些东西,但是在我对 interwebz 的所有搜索中,我找不到任何关于此的信息。

我想 fork 别人的 SVN 项目,然后把它变成一个本地 git repo(希望保留所有的 SVN 提交)。我发现的所有示例都只讨论了如何将您自己的SVN 存储库通过git svn.

例如,我偶尔会编写一些 Adob​​e AIR 应用程序,并且我喜欢使用开源的AlivePDF库来生成 PDF。SVN 存储库 URL 是http://alivepdf.googlecode.com/svn/trunk/. 由于我对在 PDF 生成中本地使用的源代码进行了一些更改,因此我想将本地 fork 转换为 git 项目。我试着做git svn clone http://alivepdf.googlecode.com/svn/trunk/ alivepdf-read-only --no-metadata --stdlayout .(从我想要存储它的目录)。但是,当我查看 git repo 历史记录(gitx在 Mac 上)时,它似乎是空的,即没有原始 AlivePDF 作者提交的历史记录。

难道我做错了什么?是不是需要先SVN fork项目,改成git项目?请指教。

4

1 回答 1

3

在我的机器上运行 git svn clone http://alivepdf.googlecode.com/svn/trunk/ alivepdf-read-only按预期工作,并为我提供完整的历史记录,例如:

nexus-Tablet8\nexus C:\Users\nexus\Development\Misc\alivepdf-read-only
[master]# git log --oneline -3
c3b93fb Add the test case reported by the user in the issue 338.
3577380  - now set the unit to the unit of the new page in addPage.  - add *MarginPt to keep the values in pixel, the olc
08653f Add a test case to test issue 340.

你看到了什么不同的东西吗?

(我尝试将此作为对您的问题的评论而不是答案,但格式被弄乱了)

于 2012-12-20T01:56:38.757 回答