Migrating svn to git (Bitbucket)
From: https://www.atlassian.com/git/tutorials/migrating-overview
- prepare
- Download migration script from Bitbucket: svn-migration-scripts.jar
- Verify prerequisites: java -jar ~/svn-migration-scripts.jar verify
- Create and mount case-sensitive disk if necessary (Mac OS X): java -jar ~/svn-migration-scripts.jar create-disk-image 5 GitMigration
- 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
- Edit authors.txt with correct info: j.doe = John Doe <john.doe@atlassian.com>
- Convert
- 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>
- Clean new git repository: java -Dfile.encoding=utf-8 -jar ~/svn-migration-scripts.jar clean-git
- Execute clean with –force option
- Sharing
- Create a Bitbucket repository
- 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
- Push the local repository to Bitbucket: git push -u origin –all
- 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.