Migrating svn to git (Bitbucket)

From: https://www.atlassian.com/git/tutorials/migrating-overview

  1.  prepare
    1. Download migration script from Bitbucket: svn-migration-scripts.jar
    2. Verify prerequisites: java -jar ~/svn-migration-scripts.jar verify
    3. Create and mount case-sensitive disk if necessary (Mac OS X): java -jar ~/svn-migration-scripts.jar create-disk-image 5 GitMigration
    4. Extract the author information from svn: java -jar ~/svn-migration-scripts.jar authors http://domain.com/path/to/svn/repo > authors.txt
      • To access remote svn, login before this command
    5. Edit authors.txt with correct info: j.doe = John Doe <john.doe@atlassian.com>
  2. Convert
    1. Clone svn repository as local git repository with git-svn: git svn clone –stdlayout –authors-file=authors.txt http://domain.com/path/to/svn/repo <git-repo-name>
    2. Clean new git repository: java -Dfile.encoding=utf-8 -jar ~/svn-migration-scripts.jar clean-git
    3. Execute clean with –force  option
  3. Sharing
    1. Create a Bitbucket repository
    2. Add an origin remote: git remote add origin https://<user>@bitbucket.org/<user>/<repo>.git
      • If remote origin is already set, remove with: git remote rm origin
    3. Push the local repository to Bitbucket: git push -u origin –all
    4. Check by cloning remote repository: git clone https://<user>@bitbucket.org/<user>/<project>.git <destination>

Only those operations I need are listed above. For more detailed operations, check the original instructions.