迁移SVN工程到GITLAB

1.迁移整个版本库,保留提交记录:

git svn clone SVN仓库地址 --stdlayout --no-metadata --authors-file userinfo.txt project(拉取的数据存储目录)

其中:

`--stdlayout` 参数表示你的项目在 SVN 中是常见的 "`trunk/branches/tags`" 目录结构,

如果不是,那你需要使用 `--tags`, `--branches`, `--trunk` 参数(通过 `git svn help` 了解)

--no-metadata:加上该参数后,生成的提交记录说明中 不会生成每一个提交记录对应的svn上的Rev版本信息。

举例:

git svn clone https://192.168.3.6/svn/xxxx --stdlayout --no-metadata --authors-file svn_user_convert.txt

2.迁移代码库中的某个分支或文件夹目录:

git svn clone SVN仓库地址 -s --no-metadata -A userinfo.txt project(拉取的数据存储目录)

如:直接迁移SVN工程下的某个分支:

git svn clone https://192.168.3.6/svn/xxx-svc --no-metadata --authors-file svn_user_convert.txt


为了获得 SVN 使用的作者名字列表,可使用GIT BASH 在SVN 项目下运行这个:

svn log --xml --quiet | grep author | sort -u | \

perl -pe 's/.*>(.*?)<.*/$1 = /'

或者手动编写作者名称对应表,txt文件。格式为:

apple = apple <apple@mymail.com>

VisualSVN Server = VisualSVN Server <xxx@mymailcom>

相关推荐
恬静的小魔龙5 小时前
【群晖Nas】群晖Nas中实现SVN Server功能、Docker/ContainerManager等
docker·svn·容器
明月心9521 天前
git remote add 用法
gitlab
only_Klein1 天前
jenkins流水线报错:Connection reset by peer
ci/cd·kubernetes·gitlab·jenkins·ssl
梁萌2 天前
docker部署gitlab和gitlab runner
docker·eureka·gitlab
johnnyAndCode2 天前
Idea 设置GitLab时使用账密,而不是token的配置方法
gitlab·idea
天外飞雨2 天前
Gitlab使用
gitlab
技术策划Boring3 天前
什么是 SVN Blame 以及如何使用
svn
BUTCHER53 天前
GitLab SSH 密钥配置
运维·ssh·gitlab
明月心9523 天前
GitLab使用
gitlab
明月心9524 天前
gitlab pull requets
gitlab