svn项目迁移至gitlab流程(保留提交记录)

所需组件

  1. git-svn
    • centos:
         yum install -y git-svn
    • ubuntu:
         apt-get install -y git-svn
    • mac:
         brew install git subversion
    • win10可使用
         git bash
  2. svn仓库地址
  3. gitlab新创建的仓库地址

    操作方法

  4. 执行命令
    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
    不要吃惊,它是在进行转换操作~
  5. 转换完成并检查转换成git的提交记录
  6. 确保检查完毕后,添加远程仓库
    git remote add origin git仓库地址
  7. 提交远程分支
    git push -u origin master
  8. 在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 协议》,转载必须注明作者和本文链接
codezhao
讨论数量: 0
(= ̄ω ̄=)··· 暂无内容!

讨论应以学习和精进为目的。请勿发布不友善或者负能量的内容,与人为善,比聪明更重要!