Skip to content

Instantly share code, notes, and snippets.

@fengmk2
Last active March 23, 2018 10:45
Show Gist options
  • Star 17 You must be signed in to star a gist
  • Fork 6 You must be signed in to fork a gist
  • Save fengmk2/5458302 to your computer and use it in GitHub Desktop.
Save fengmk2/5458302 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 = 苏千 <suqian.yf@taobao.com>
...
zhangxing_z.pt = 章星 <zhangxing_z.pt@taobao.com>
zhenghaibo.pt = 郑海波 <zhenghaibo.pt@taobao.com>

从svn clone 出来

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

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

$ git remote add origin git@gitlab.abc.com:weibo.git

push 到 gitlab

$ git push origin --all
@AgoniNemo
Copy link

AgoniNemo commented Nov 24, 2017

在使用ssh -T git@gitlab-zxf测试时,返回ssh: Could not resolve hostname http://10.10.10.79: nodename nor servname provided, or not known是什么原因?

#gitlab xx@163.com
host gitlab-xzc
    hostname http://10.10.10.79
    User xiezc
    Port 11000
    IdentityFile ~/.ssh/id_rsa

#gitlab xx@163.com
host gitlab-zxf
    hostname http://10.10.10.79
    User zhouxf
    Port 11000
    IdentityFile ~/.ssh/gitlabz_id_rsa

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment