Skip to content

Instantly share code, notes, and snippets.

@geekwho-eth
Forked from fengmk2/svn-to-git.md
Created November 26, 2016 04:57
Show Gist options
  • Save geekwho-eth/c1804a62c074fc2b998e01675edb1f63 to your computer and use it in GitHub Desktop.
Save geekwho-eth/c1804a62c074fc2b998e01675edb1f63 to your computer and use it in GitHub Desktop.
从 svn 迁移到 gitlab svn to git

从 svn 迁移到 gitlab

找出所有提交者

$ svn log --xml | grep author | sort -u | perl -pe 's/.>(.?)<./$1 = /'

手动设置对应关系 users.txt

suqian.yf = 苏千 <[email protected]>
...
zhangxing_z.pt = 章星 <[email protected]>
zhenghaibo.pt = 郑海波 <[email protected]>

从svn clone 出来

$ git svn clone http://svnurl.com/weibo/trunk --authors-file=users.txt --no-metadata weibo

在gitlab上创建tcif项目,并添加到remotes

$ git remote add origin [email protected]:weibo.git

push 到 gitlab

$ git push origin --all
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment