This tutorial assumes that you have some familiarity with git and svn. Seamless migration from svn to gitlab private repository will preserve all submitted commits and committed log.

Create a new project with the corresponding name in gitlab

 Please pay attention to build the group and add your own ssh-key in the profile settings.
 ## Using appinfo-service as an example to migrate
 Git svn clone svn://ip/LocalService/appinfo-service –no-metadata –authors-file=users.txt –trunk=/ –tags=tags –branches=branches
Cd appinfo-service
Git remote add origin git@ip:mob-localservice/appinfo-service.git
Git push -u origin master

Users.txt is a mapping relationship between svn users and git users.

Username = zhouzhipeng 

Optimizing the directory structure

Mv trunk/* .
Rm -rf trunk
Git add .
Git commit . -m "remove the trunk directory"
Git push

problem solved

If the first git svn clone command is executed, the error is as follows:

 Solution reference:

Last modified: 2019年3月29日



Write a Reply or Comment

Your email address will not be published.