叉远程SVN回购到git

时间:2012-12-19 23:34:39

标签: git svn git-svn

道歉,如果这个问题是重复的,或者我错过了什么,但是在我搜索interwebz时,我找不到任何相关的信息。

我想分叉其他人的SVN项目,然后将其转换为本地git仓库(希望保留所有SVN提交)。我发现的所有示例都只讨论了如何通过git svn您自己的 SVN repo转换为git repo。

例如,我偶尔会编写一些Adobe AIR应用程序,我喜欢使用开源AlivePDF库生成PDF。 SVN repo 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历史记录(Mac上为gitx)时,它似乎是空的,即没有原始AlivePDF作者提交的历史记录。

我做错了吗?我是否需要首先使用SVN fork项目,然后将其更改为git项目?请指教。

1 个答案:

答案 0 :(得分:2)

运行 我的机器上的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.

您是否看到了不同的东西?

(我试着将这个问题作为你的问题的评论,而不是答案,但格式搞砸了)

相关问题