如何将具有历史记录的 SVN 存储库迁移到新的 Git 存储库?
我阅读了 Git 手册、FAQ、Git - SVN 速成课程等,他们都解释了这个和那个,但你找不到像这样的简单说明:
I read the Git manual, FAQ, Git - SVN crash course, etc. and they all explain this and that, but nowhere can you find a simple instruction like:
SVN 仓库在:svn://myserver/path/to/svn/repos
Git 仓库在:git://myserver/path/to/git/repos
git-do-the-magic-svn-import-with-history
svn://myserver/path/to/svn/repos
git://myserver/path/to/git/repos
我不希望它那么简单,我也不希望它是一个单一的命令.但我确实希望它不会试图解释任何事情 - 只是说明在此示例中要采取的步骤.
I don't expect it to be that simple, and I don't expect it to be a single command. But I do expect it not to try to explain anything - just to say what steps to take given this example.
魔法:
$ git svn clone http://svn/repo/here/trunk
Git 和 SVN 的操作非常不同.你需要学习Git,如果你想跟踪SVN上游的变化,你需要学习git-svn
.git-svn
主页有一个很好的例子部分:
Git and SVN operate very differently. You need to learn Git, and if you want to track changes from SVN upstream, you need to learn git-svn
. The git-svn
main page has a good examples section:
$ git svn --help