Subversion (SVN) is a central version control system (VCS) while Git is a distributed version control system.
If you are currently using an SVN repository, you can migrate the repository to Git and GitLab. We recommend a hard cut over – run the migration command once and then have all developers start using the new GitLab repository immediately.
Then now lets prepare authors file so svn2git can map authors to Git authors,if we are not choose to create authors file then commits will not be aviable in Gitlab.If auhtors is required to may every author that is present in the SVN repository.
To find the list of authors in svn repository,run the below command.
From this output,lets prepare authors file.Create file called authors.txt and make sure the format is correct in the file.
Now,checkout the repository and do the conversion in the current working directory.Make sure to create a new directory for each repository before running the below command.
If your SVN repository need username and password to be added,will add the –username <username> and –password <password> flags to the above command.
svn2git supports excluding certain file paths,branches,tags,etc.
Now lets create a new GitLab project and we will push our converted code.Copy the SSH or HTTPS repository URL from the project page.Add the Gitlan repository as Git remote and push all the changes.
This will push all commits,branches and tags.
That’s all, See your GitLab in web view you can see all SVN code in GitLab with commit status and all old history.
© 2019, Techrunnr. All rights reserved.