git - how can I clone local svn repository?

元气小坏坏 提交于 2019-12-21 06:51:06

问题


I am completely unable to find any explanation how I should specify location of existing svn repository.

In other words - what should be used as URL in

git svn clone URL

when svn repository is local?


回答1:


You should be able to succeed like this:

git svn clone file:///e/svn_repo_on_E_drive

Similar to svn checkout command:

svn co file:///e/svn_repo_on_E_drive

file:// for folder on the current drive of the executing CMD prompt, file:///d/some_folder for D:\some_folder.

Note: The extra / and the removed drive colon in the file link on Windows. file://e:/svn_repo_on_E_drivefile:///e/svn_repo_on_E_drive




回答2:


For a local repository you use a file:// URL, same as would be used for doing a checkout with the normal svn client.

If you're trying to copy the entire history, and using git svn clone --stdlayout just use the URL that you would use to checkout the trunk with svn minus the /trunk portion at the end.



来源:https://stackoverflow.com/questions/15374353/git-how-can-i-clone-local-svn-repository

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!