如何将SVN存储库的本地克隆转换为git [英] How can I convert a local clone of SVN repo to git

查看:79
本文介绍了如何将SVN存储库的本地克隆转换为git的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尽管这听起来像是一个常见问题,但实际上我找不到任何线程与我在#SO上遇到的相同问题.

Although this sounds like a common question, I actually could not find any thread with the same issue I am having on #SO.

我有一个svn存储库的旧副本(从不再存在的存储库中检出-服务器已在不久前停用).我想签出该存储库上的提交历史记录.我认为,由于回购协议的根目录中有一个".svn"文件夹,其中包含65 + M的数据,因此应该可以这样做.

I have an old copy of an svn repo (checked out from a repo that does no longer exist - server decommissioned a while ago). And I want to checkout commit history on that repo. I figured since there is a ".svn" folder in the root of the repo with 65+M of data in it that it should be possible to do so.

到目前为止我尝试过的操作(但不起作用):初始化一个新的git repo并尝试将现有的repo转换为git

What I tried so far (but is not working) : Init a new git repo and try to convert existing repo to git

#初始化空git repogit initgit svn rebase -l

#初始化git-svn回购rm -rf .gitgit svn init http://same/url/as/the/one/used/before/decommissioning/the/servergit svn rebase -l

我想做的甚至有可能吗?我正在寻找的数据甚至可以脱机使用吗?

Is what I am trying to do even possible ? Is the data I am looking for even available offline ?

推荐答案

我认为这是不可能的.本地SVN结帐所包含的信息不足,无法用作存储库.没有历史信息-全部在服务器上.

I think this is impossible. Local SVN checkout doesn't contain enough information to serve as a repository. There is no history information — it's all on the server.

您需要实时服务器或 svnadmin dump 中的转储.

You need a live server or a dump from svnadmin dump.

这篇关于如何将SVN存储库的本地克隆转换为git的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆