You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
On all systems you can install as a Ruby `gem` if you already have Ruby and Git installed.
```sh
sudo gem install svn2git
```
## Checkout SVN Repo
Checkout the latest SVN Repository of the project you want to convert.
```sh
svn co --username <your_name> https://svn.server.com/repository/trunk
```
## Map Authors (Optional)
Prepare an authors file so `svn2git` can map SVN authors to Git authors. If you choose not to create the authors file then commits will not be attributed to the correct Git user. Some users may not consider this a big issue while others will want to ensure they complete this step. If you choose to map authors you will be required to map every author that is present on changes in the SVN repository. If you don't, the conversion will fail and you will have to update the author file accordingly. The following command will search through the repository and output a list of authors.
3. The svn repo is **NOT** in standard layout and has no trunk, branches, or tags at the root level of the repo. Instead the root level of the repo is equivalent to the trunk and there are no tags or branches.
There are still several ways and can be refer to [this](https://github.com/nirvdrum/svn2git) link.
## Create Git Project
Create a new Git project, where you will eventually push your converted code. Copy the SSH or HTTP(S) repository URL from the project page. Add the GitLab repository as a Git remote and push all the changes. This will push all commits, branches and tags.