svn项目迁移至gitlab流程(保留提交记录)
所需组件
- git-svn
- centos:
yum install -y git-svn
- ubuntu:
apt-get install -y git-svn
- mac:
brew install git subversion
- win10可使用
git bash
- centos:
- svn仓库地址
- gitlab新创建的仓库地址
操作方法
- 执行命令
注: 如果出现了下面的情况git svn clone svn仓库地址
不要吃惊,它是在进行转换操作~W: Ignoring error from SVN, path probably does not exist: (160013): Filesystem has no item: 'src' path not found W: Do not be alarmed at the above message git-svn is just searching aggressively for old history. This may take a while on large repositories
- 转换完成并检查转换成git的提交记录
- 确保检查完毕后,添加远程仓库
git remote add origin git仓库地址
- 提交远程分支
git push -u origin master
- 在gitlab上检查项目
发布成功后校验是否影响功能,如果无异常,致此大功告成!!!~有异常则需特殊处理
注: git-svn 其他参数:git svn clone svn://ip端口/projectname --no-metadata --authors-file=users.txt projectname
–authors-file=users.txt (svn账号与git账号映射,users.txt)
projecename 文件名称
本作品采用《CC 协议》,转载必须注明作者和本文链接