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

相关推荐
月上柳青9 小时前
docker gitlab arm64 版本安装部署
docker·容器·gitlab
画船听雨眠aa1 天前
gitlab云服务器配置
服务器·git·elasticsearch·gitlab
玉米的玉*」*4 天前
新项目上传gitlab
gitlab
鲁子狄4 天前
[笔记] 极狐GitLab实例 : 手动备份步骤总结
linux·运维·笔记·ubuntu·centos·gitlab
H.205 天前
centos7安装SVN
svn
zhuangzhunag6 天前
svn diff 同一个文件的不同版本命令
svn
null or notnull6 天前
IDEA2020同时使用SVN和GIT
ide·svn·gitee·github
节省钱8 天前
【Git】如何在 Git 提交后补充 Change-Id
服务器·git·gitee·gitlab·github·gitcode
dujunqiu8 天前
gitlab处理空文件夹的提交或空文件夹提交失败
git·gitlab·github
摸鱼仙人~9 天前
将本地项目上传到 GitLab/GitHub
elasticsearch·gitlab·github