从 SVN 迁移至 Git 并保留所有 commit 记录

yum install -y git-svn

用户映射文件user.txt,等号左边为svn账号,右边为Git用户名和邮箱。
注意:svn中有多少用户就要映射多少

test1=test1<147258369@qq.com>
test2=test2<246813579@qq.com>


--生成秘钥 admin@example.com为GitLab的root用户邮箱地址
ssh-keygen -t rsa -b 4096 -C "admin@example.com"

--查看公钥内容,将内容复制到GitLab配置中的SSH Keys
cat /root/.ssh/id_rsa.pub


--svn转换为git dsidealTest为项目名称
git svn clone https://10.10.6.175/svn/dsidealTest --no-metadata --authors-file=user.txt dsidealTest
cd dsidealTest

--添加git仓库
git remote add origin git@10.10.14.234:root/dsidealTest.git

--提交到gitlab
git push -u origin master

原文地址:https://www.cnblogs.com/kgdxpr/p/10953859.html