Skip to content

sawano/docker-svn2git

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Utilities for migrating SVN repositories to Git

There are two tools to chose from: svn2git, and a tool provided by Atlassaian (https://www.atlassian.com/git/tutorials/migrating-overview).

svn2git

This is the tool svn2git https://github.com/nirvdrum/svn2git packaged as a Docker container. It's been packaged to simplify installment of the actual tools needed.

Prerequisites

  • Docker installed
  • Tweak the shell scripts if you need to add more options to svn2git.

How to migrate

The steps involved are:

  • Run extract-authors.sh
  • Edit authors.txt
  • Run migrate-to-git.sh (this can take a while)
  • Check that the local Git repo is ok
  • Push to remote Git repo (e.g. GitHub, Stash)

First run extract-authors.sh to extract the users from the SVN repos.

E.g.:

extract-authors.sh http://mydomain.example.com/repos/my/repo $PWD

This will create a file authors.txt. Edit that file and add names and emails to use in the Git repo. E.g. final file should look like:

john = John Doe <[email protected]>
jane = Jane Doe <[email protected]>

Once you're done you can run migrate-to-git.sh. E.g.:

migrate-to-git.sh http://mydomain.example.com/repos/my/repo $PWD

Atlassian tool

This is the tool from Atlassian https://www.atlassian.com/git/tutorials/migrating-overview packaged as a Docker container. It's been packaged to simplify installment of the actual tools needed.

Prerequisites

  • Docker installed
  • Tweak the shell scripts if you need to add more options to svn2git.

How to migrate

The steps involved are:

  • Run extract-authors.sh
  • Edit authors.txt
  • Run migrate-to-git.sh (this can take a while)
  • Run clean-migrated-repo.sh
  • Check that the local Git repo is ok
  • Push to remote Git repo (e.g. GitHub, Stash)

First run extract-authors.sh to extract the users from the SVN repos.

E.g.:

extract-authors.sh http://mydomain.example.com/repos/my/repo $PWD

This will create a file authors.txt. Edit that file and add names and emails to use in the Git repo. E.g. final file should look like:

john = John Doe <[email protected]>
jane = Jane Doe <[email protected]>

Once you're done you can run migrate-to-git.sh. E.g.:

migrate-to-git.sh http://mydomain.example.com/repos/my/repo $PWD

About

Tools for migrating SVN repositories to Git

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages