svn如何迁移到git
背景
1 | svn仓库doc目录结构如下: |
将doc中的test迁移到git中
配置用户转化文件authors.txt,内容如下
1 | st=Similar Su<similarsu@qq.com> |
安装git-svn命令
1 | sudo apt install git-svn |
转化成git
1 | git svn clone --trunk=/test/trunk --branches=/test/branches --tags=/test/tags --authors-file=authors.txt svn://localhost/doc test |
将doc中的test2/branches/1.0.0/code 迁移到git中
执行如下命令
1 | git svn clone --branches=/test2/branches/1.0.0/code --authors-file=authors.txt svn://localhost/doc code |