git - 如何克隆本地 svn 存储库?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/15374353/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
git - how can I clone local svn repository?
提问by Bulwersator
I am completely unable to find any explanation how I should specify location of existing svn repository.
我完全找不到任何解释我应该如何指定现有 svn 存储库的位置。
In other words - what should be used as URL in
换句话说 - 什么应该用作 URL
git svn clone URL
when svn repository is local?
当 svn 存储库是本地的?
回答by zionyx
You should be able to succeed like this:
你应该能够像这样成功:
git svn clone file:///e/svn_repo_on_E_drive
Similar to svn checkout command:
类似于 svn checkout 命令:
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
.
file://
for 正在执行 CMD 提示的当前驱动器上的文件夹,file:///d/some_folder
对于D:\some_folder
.
Note: The extra /
and the removed drive colon in the file link on Windows. file://e:/svn_repo_on_E_drive
→ file:///e/svn_repo_on_E_drive
注意:/
Windows 上文件链接中的额外和删除的驱动器冒号。file://e:/svn_repo_on_E_drive
→file:///e/svn_repo_on_E_drive
回答by qqx
For a local repository you use a file://
URL, same as would be used for doing
a checkout with the normal svn client.
对于本地存储库,您使用file://
URL,与使用普通 svn 客户端进行检出时使用的URL 相同。
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.
如果您尝试复制整个历史记录,并且git svn clone
--stdlayout
只需使用您用来通过 svn 检出主干的 URL 减去/trunk
末尾的部分。