SVN 转为 Git 步骤:
1. 查看分支
$ svn ls svn://*/lngi2.0 --verbose
2450 admin 4▒▒ 01 11:17 ./
2442 b 2▒▒ 25 10:10 Document/
1363 c 1▒▒ 31 2018 Software/
2450 d 4▒▒ 01 11:17 branch/
2449 e 3▒▒ 30 14:42 doc/
103 f 7▒▒ 19 2016 trunk/
svn ls svn://*/lngi2.0/branch --verbose
2450 admin 4▒▒ 01 11:17 ./
2441 b 2▒▒ 19 16:16 2.0P/
2447 c 2▒▒ 28 13:27 Build/
2000 d 2▒▒ 25 2019 GEM_del/
2450 admin 4▒▒ 01 11:17 GlobalA/
2209 e 7▒▒ 18 2019 ThirdPartyLibraries/
2. 查看提交的人员
svn log --xml | grep "^<author" | sort -u | \awk -F '<author>' '{print $2}' | awk -F '</author>' '{print $1}' > userinfo.txt
3. 通过git svn clone克隆一个git版本库
git svn clone svn://*/trunk --no-metadata --no-minimize-url --authors-file=userinfo.txt trunk
git svn clone svn://*/Document --no-metadata --no-minimize-url --authors-file=userinfo.txt Document
git svn clone svn://*/Software --no-metadata --no-minimize-url --authors-file=userinfo.txt Software
git svn clone svn://*/doc --no-metadata --no-minimize-url --authors-file=userinfo.txt doc
git svn clone svn://*/2.0P/ --no-metadata --no-minimize-url --authors-file=userinfo.txt 2.0P
4. 关联远程仓库
git remote add origin http://*.git
5. 新建分支
git branch 2.0P
6.切换分支
git checkout 2.0P/
7. 推送到远程分支
git push --set-upstream origin GEM_del
git push -u origin