迁移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>

相关推荐
霸道流氓气质7 天前
GitLab CI/CD 完全指南
linux·ci/cd·gitlab
sbjdhjd7 天前
从零搭建企业级 CI/CD(下):Jenkins+GitLab+Harbor 全链路实战指南
git·servlet·ci/cd·云原生·云计算·gitlab·jenkins
2601_961875248 天前
花生十三公考课程|网课|视频
数据库·windows·git·svn·eclipse·github
用什么都重名8 天前
Git 合并两个无共同历史的分支:从报错到解决全记录
git·gitlab
master3368 天前
GitLab (Docker) 常用命令及解决方案清单
docker·容器·gitlab
2601_961875248 天前
花生十三资料网盘|百度云|下载
数据库·windows·git·svn·eclipse·github
qq_356408668 天前
GitLab 单机私有化部署文档(基于 Docker 环境)
docker·gitlab
lisanmengmeng10 天前
gitlab 免密配置
linux·服务器·gitlab
求知若渴,虚心若愚。10 天前
Jenkins 自动化流水线(CICD)
运维·自动化·gitlab
mnasd12 天前
Gitlab + Jenkins 实现 CICD
运维·gitlab·jenkins