首先準(zhǔn)備一個(gè)users.txt
,設(shè)置svn賬戶與git賬戶的對應(yīng)關(guān)系
user1 = user1<user1@example.com>
zhangsan = zhangsan<zhangsan@example.com>
然后執(zhí)行以下命令
git svn clone svn://192.168.99.99/projects/project1 --prefix=svn/ --no-metadata --authors-file=users.txt new-project-name
如果項(xiàng)目版本較多熔脂,這個(gè)過程可能持續(xù)幾個(gè)小時(shí)暮胧。
如果遇到Using higher level of URL: svn://192.168.1.2/a/b/c/d/trunk => svn://192.168.1.2/a
,可以加上--no-minimize-url
選項(xiàng)竭沫。