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

相关推荐
CC码码18 小时前
管理你的多个 Git 密钥(多平台多账号)
git·gitlab·github
CC码码18 小时前
管理你的多个 Git 密钥(单平台多账号)
git·gitlab·github
兔老大RabbitMQ1 天前
GitLab详细分析
gitlab
阳光开朗_大男孩儿11 天前
SVN上传代码
java·linux·服务器·svn
阳光开朗_大男孩儿11 天前
SVN 添加 .ignore
svn
小道仙9714 天前
gitlab对接,gitlabRestApi,gitlab4j-api
java·git·gitlab
搬码临时工14 天前
svn客户端使用教程简易入门:附外网远程访问内网SVN服务通用方法
svn
tswddd14 天前
项目:Gitlab HSD CI/CD总结
ci/cd·kubernetes·gitlab
许_安15 天前
docker中部署gitlab
docker·eureka·gitlab
Haoea!15 天前
持续集成 CI/CD-Jenkins持续集成GitLab项目打包docker镜像推送k8s集群并部署至rancher
ci/cd·gitlab·jenkins·rancher