Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Subversion to Git Migration


Published on

Talk I presented at the BigCommerce meetup recently

Published in: Technology, Business
  • Be the first to comment

Subversion to Git Migration

  1. 1. SVN to Git Migration
  2. 2. Technology➔ Gitolite.➔ Atlassian Suite.➔ Internal system ”Octopus”.
  3. 3. Migrating the code
  4. 4. git-svn➔ Slow...➔ Didnt handle shallow merges well.➔ Our old branches didnt map well.➔ Works fine for small repos.➔ Not right for our repo.
  5. 5. svn-all-fast-export➔ Faster.➔ Direct access to git from C libs.➔ Easier to configure.
  6. 6. svn-all-fast-export# rules­mapcreate repository bigcommerceend repository match /trunk/  repository bigcommerce  branch master end match...match /branches/([^/]+)/ repository bigcommerce branch 1end match...match /tags/7.3.23/ repository bigcommerce branch refs/tags/7.3.23 annotated trueend match
  7. 7. svn-all-fast-export# svn­authorsanna.pomroy = Anna Pomroy <>chris.beckett = Chris Beckett <>chris.boulton = Chris Boulton <>...# import commandsvn­all­fast­export ­­identity­map svn­authors ­­rules map ­­add­metadata /var/svn/bigcommerce
  8. 8. svn-all-fast-export➔ Problem:  Post migration branch amnesia.  Only affected some branches.➔ Solution(s):  Patch from the original svn branch.  Rebranch in git, resolve lots of conflicts and pay close attention!
  9. 9. svn-all-fast-export➔ Problem:  Wrong revision used to create a branch on import.➔ Solution:  Fix it in the source & submit a patch!  Check & double check...
  10. 10. How are we using git?
  11. 11. SVN branching model Tues Mon Tues MonStability Feature-Y Feature-X Trunk RC-02 x RC-01 tfi Ho 1.0 1.2 Time
  12. 12. Gitflow branching model Tues Mon Tues MonStability Feature/y Feature/x Develop Release/1.0 Release/1.3 master 1.3 1.0 1.2 1.3 Time
  13. 13. Rome wasntbuilt in a day...
  14. 14. Identified issues➔ svn:ignore.  Create .gitignore➔ Empty directories.  Fill with .empty files➔ Commit hooks.  Use gitty for hook management.
  15. 15. Unidentified problems➔ ”Time & tide waits for no man”.  We were fixing the deployment system ”Octopus” on the day.  Last minute cherry-picks to tags/branches to get them working.
  16. 16. Why did we do it? ”...what if anything is ”I miss my git blocking us from switching to git forstaging area already” source control?” ”Maybe we should ”f**k; I keep evaluate git more” typing git status”
  17. 17. Immediate Benefits➔ Decentralised, remote work.➔ Much, much faster.➔ Staged commits, stashes.➔ Flexible & powerful cmd line.
  18. 18. Questions?