简体   繁体   English

可以将SVN存储库迁移到仅是本地副本的git吗?

[英]Possible to migrate an SVN repo to git that is a local copy only?

I have a clone of an SVN repo on my machine for which the SVN server is unreachable. 我的机器上有一个SVN存储库的克隆,而SVN服务器无法访问。 The program used for cloning is Tortoise SVN for Windows. 用于克隆的程序是Windows的Tortoise SVN。

Is there any way to import the commit history of the repo into a git repository on github? 有什么办法可以将仓库的提交历史导入到github上的git仓库中?

I tried 我试过了

svnadmin dump repo/.svn > svn.dump

Resulting in 导致

svnadmin: E165005: Expected repository format '3' or '5'; found format '12'

Which seems to be misleading, meaning I cannot dump that copy. 这似乎具有误导性,这意味着我无法转储该副本。 But are there options other than dumping? 但是除了倾销之外还有其他选择吗?

I suspect now this is impossible. 我怀疑现在这是不可能的。 Local SVN checkout doesn't contain enough information to serve as a repository. 本地SVN结帐没有足够的信息来充当存储库。 There is no history information — it's all on the server. 没有历史信息-全部在服务器上。

Your only way is to simply remove .svn subdirectories and run git init && git add . 您唯一的方法是简单地删除.svn子目录并运行git init && git add . to create a repository with your files. 用文件创建存储库。 No history. 没有历史。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM