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

相关推荐
菜萝卜子6 小时前
【Git】GitLab 18.9 全局服务器钩子(Server Hooks)官方规范与落地实践
服务器·git·gitlab
长沙红胖子Qt8 小时前
SVN培训笔记(四):使用sourceTree时,PC硬盘或者移动硬盘更换电脑后sourceTree无法拉取同步和推送已有项目管理的处理方法
svn·sourcetree管理svn·sourcetree迁移git·git svn
lilili也1 天前
Git、VScode、GitLab
git·vscode·gitlab
郭龙_Jack2 天前
Gitlab CICD流水线设计
gitlab
金融小师妹2 天前
AI多因子定价模型:美元强化与能源约束下 黄金反弹受限弹性解析
深度学习·svn·逻辑回归·能源
Irene19912 天前
推荐 win11 可用的 SVN 版本:64位,下载最新的 TortoiseSVN 1.14.x 版本
svn
曹牧2 天前
SVN:“both sides of the move must be committed together”
svn
CDwenhuohuo2 天前
svn小乌龟汉化包下载实现
svn
MinterFusion3 天前
如果openKylin 2.0 SP2主机的IPv4地址改变,如何让GitLab正常运行
运维·gitlab·系统配置·系统维护·明德融创
Elivs.Xiang3 天前
ubuntu20中安装gitlab
linux·ubuntu·gitlab