Monday, 8 September 2014

Migrate your project from SVN to Git Stash in few steps

Step by step guide on how to migrate your SVN repository with all its history to the Stash, the Atlassian git manager.

Only once :

  1. add the ssh key
  2. open a terminal 
  3. create the authors.txt file in ~/Documents/ 
  4. git config svn.authorsfile ~/Documents/authors.txt 

authors.txt format :

username = Name LastName <email>

example :

gordof = Gordon Flash <>
marcoc = Marco Castigliego <>

For each project :

For this example I will migrate a project called super-hero-service.

  1. Tell your team members to not commit on the project during the process.
  2. Open a terminal
  3. cd ~
  4. mkdir migration
  5. cd migration
  6. git svn clone svn+ssh:// --trunk=super-hero-service super-hero-service
  7. go to take a coffee
  8. cd super-hero-service
  9. git svn show-ignore (Which outputs everything in the SVN ignore property to the console. Then you can copy this to a new file called .gitignore at the root of your repository.Add and commit the file.)
  10. go to and create a repository called super-hero-service
  11. git remote add origin ssh://
  12. git push -u origin master

No comments:

Post a Comment