简体   繁体   English

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

[英]git - how can I clone local svn repository?

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 存储库是本地的?

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://用于执行 CMD 提示的当前驱动器上的file:///d/some_folderfile:///d/some_folder用于D:\\some_folder

Note: The extra / and the removed colon : in the file link on Windows.注意:额外的/和删除的冒号:在 Windows 上的文件链接中。 file://e:/svn_repo_on_E_drivefile:///e/svn_repo_on_E_drive file://e:/svn_repo_on_E_drivefile:///e/svn_repo_on_E_drive

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部分。

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

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