想把svn仓库转换成git.通过网上查阅资料,得知应使用命令
git svn clone https://xxx.googlecode.com/svn/ -s
如果是本地文件,则命令是
git svn clone file:///tmp/xxx-svn -s
在windows下操作出现了问题:
1.用TortoiseGit,URL处填写D:\Repositories\project1,出现错误:git did not exit cleanly (exit code 1)
2.用Git Bash,git svn clone file:///d:\repositories\project1,出现错误
Couldn't open a repository: Unable to open an ra_local session open repository 'file:///d%3A/repositories/SVN': Expected FS format '2';
found format '4' at /usr/lib/perl5/site_perl/Git/SVN.pm line 148
差了很多资料都没找到问题原因.
解决方案:
利用VisualSVN Server架设了SVN服务器,用TortoiseGit的Git Clone,URL处填写http://127.0.0.1/svn/project1/
等同命令:
git.exe svn clone "http://127.0.0.1/svn/project1/" "G:\myproject\project1" -T trunk -b branches -t tags