svn 版本迁移到 git 仓库

本文介绍了如何将Subversion (SVN) 代码库转换为Git版本控制系统,并将其推送到GitLab的过程。主要内容包括使用gitsvn工具进行代码迁移、解决提交者映射问题以及推送至远程GitLab仓库。

 

1、拉取 svn代码并转成 git 版本

git svn fetch http://svn.qtz.com/svn/qtz_code/java/qtz_sm/project/qtz_sm -Auser.txt

user.txt 文件格式如下

xiaolailong    = Loissiau<xiaolailong@yw01.com>

如果中途报有svn提交者未映射,则 补上 ,再进入git仓库目录,执行

git svn fetch -Auser.txt

 

-Afilename 相当于 --author-files=filename

 

2、push 到git-lab

 

参考文档:

1、 https://git-scm.com/book/zh/v2/Git-%E4%B8%8E%E5%85%B6%E4%BB%96%E7%B3%BB%E7%BB%9F-%E8%BF%81%E7%A7%BB%E5%88%B0-Git

2. [How do I migrate an SVN repository with history to a new Git repository?](https://stackoverflow.com/questions/79165/how-do-i-migrate-an-svn-repository-with-history-to-a-new-git-repository)

转载于:https://www.cnblogs.com/xunux/p/5615101.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值