简体   繁体   English

如何将本地svn存储库克隆到本地git存储库?

[英]How to clone local svn repository to local git repository?

Recently I am working on migrating one of my SVN repository to Git. 最近,我正在将我的SVN存储库之一迁移到Git。 I am able to do so if I use my svn repository on internet. 如果我在互联网上使用我的svn存储库,则可以这样做。 But the repository is too big (It has over 60000 commits ) so it is taking a very long time to do so. 但是存储库太大( 提交超过60000次 ),因此需要很长时间。 The internet gets disconnected in between then I have to start over. 互联网之间断开连接,然后我必须重新开始。 So, I thought to clone the svn repo onto my local and then clone the local svn repo to local git repo. 因此,我想将svn仓库克隆到本地,然后将本地svn仓库克隆到本地git仓库。 BUT I am only able to clone SVN repo to my local and unable to clone it to local git repo. 但是我只能将SVN仓库克隆到本地,而不能将其克隆到本地git仓库。 I am using git-svn to do so. 我正在使用git-svn这样做。 I am getting the following error. 我收到以下错误。

“Can't create session: Unable to connect to a repository at URL 'file:///c:/gitMigr/repo-svn': Unable to open repository 'file:///c:/gitMigr/repo-svn' at C:/Program Files/Git/mingw64/share/perl5/Git/SVN.pm line 310.” “无法创建会话:无法通过URL'file:/// c:/ gitMigr / repo-svn'连接到存储库:无法打开存储库'file:/// c:/ gitMigr / repo-svn'在C:/ Program Files / Git / mingw64 / share / perl5 / Git / SVN.pm第310行。”

I already have the authors.txt file in my directory. 我的目录中已经有authors.txt文件。 I am using the following command: 我正在使用以下命令:

git svn clone file:///c:/gitMigr/repo-svn --no-metadata -A authors.txt --stdlayout temp

Note: "temp" is my local git repo name in which I want to clone the svn repo. 注意: “ temp”是我要克隆svn repo的本地git repo名称。 Please help me out. 请帮帮我。 Thanks in advance. 提前致谢。

install subversion locally in order to import your dump, then with git-svn package. 在本地安装subversion以便导入您的转储,然后使用git-svn包。

You can use git svn clone file:///path/to/svn/repo /path/to/empty/dir 您可以使用git svn clone file:///path/to/svn/repo /path/to/empty/dir

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

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