• svn迁移到git


    步骤命令如下:

    > git svn clone https://svn-url/ProjectName --no-metadata --authors-file=user.txt --trunk=/ --tags=tags --branches=branches --ignore-refs=refs/remotes/ProjectName-.* 
    > cd  ProjectName
    > git remote rm origin
    > git remote add origin http://git-url/ProjectName.git
    > git push -u origin master

    命令注释:

    第一行:复制项目ProjectName从svn到本地git;【注意:user.txt为svn用户对于git的用户文件,格式:xxx = xxx <xxx@xxx.com>.(执行dos命令把user.txt放dos执行路径下);】

      参数–no-metadata表示阻止git导出SVN包含的一些无用信息
      参数–authors-file表示SVN账号映射到git账号文件,所有svn作者都要做映射
      参数–trunkmobile表示主开发项目
      参数–branches表示分支项目,--ignore-refs表示不包含后面的分支项目
      参数ProjectName表示git项目名称

    第二行:进入项目;

    第三行:可以忽略,移除此文件夹下的源,报错已经存在源的时候,需要执行;

    第四行:增加到远程git地址;

    第五行:推送到git地址到master版本;

  • 相关阅读:
    Codeforces_739_B
    Codeforces_732_D
    D
    C
    E
    商汤AI园区的n个路口(中等)
    D. The Fair Nut and the Best Path
    HDU6446
    分解质因数(线性筛)
    D. Extra Element
  • 原文地址:https://www.cnblogs.com/vipstone/p/5092425.html
Copyright © 2020-2023  润新知