SVN to GIT migration with branch history merging

One more “stupid” question about svn to git migration : )
I have one old svn repo with ~20 projects inside.


I want to migrate only projectA with keeping all it’s history. Sounds easy : ) But main problem is in structure and revision history inside projectA.

  • How to deal with .csproj in git
  • deriving version numbers from a git repository
  • How can I create a Git bare repository from within Visual Studio 2015?
  • Why isn't a conceptual Git article out there without any piece of console juggling?
  • Missing Master and Recently Made Branches in Active Repository in Visual Studio 2015
  • Create a copy of each version of a file in a git repository
  • /
    |       |-trunk
    |       |-branches
    |       |         |-version 1.0 
    |       |         |-version 1.1
    |       |         |-version 1.2
    |       |-tags
    • 2009: we had only “trunk”, and all changes where committed to trunk
    • 2010: branch version 1.0 was created based on trunk. Commits to
      trunk and commits to version 1.0 (some customers had version from
      trunk, some from branch)
    • 2011: branch version 1.1 was created based
      on version 1.0. Commits to trunk, commits to version 1.0 and 1.1
    • 2012: branch version 1.2 was created based on version 1.1. Commits
      to trunk, commits to version 1.0,1.1 and 1.2

    Now we are going to upgrade all customers to version 1.2 and to migrate project to git.
    what I want to migrate to GIT:

    • new trunk of project with history:
      • commits to trunk for 2009
      • commits to version 1.0 for 2010 (represent as commits to trunk)
      • commits to version 1.1 for 2011 (represent as commits to trunk)
      • commits to version 1.2 for 2012 (represent as commits to trunk)

    What I do not want to migrate:

    • tags
    • trunk history for period 2010-2012
    • version 1.0 history for period 2011-2012
    • version 1.1 history for period 2012

    Any ideas?

  • How can I set read only access to ssh git server?
  • Is there a way to lock a GIT tag?
  • best/simplest way to keep multiple (non-bare) Git repos in sync
  • How do I resolve SVN error “E200030: There are unfinished transactions detected in '<CHECKOUT_DIRECTORY>'”?
  • Git pull is very slow.. why?
  • Executing a git-hook after pull --rebase
  • One Solution collect form web for “SVN to GIT migration with branch history merging”

    Don’t be tempted to get all of the commits migrated over. It’s not worth the effort. Take the snapshots of each of the important tags, branches, etc. and commit them in git in a fashion that mirrors what was done in SVN.

    Instead, keep the SVN history on a server, CD, DVD, etc so you can inspect things when you need to. You have just saved your sanity.

    Git Baby is a git and github fan, let's start git clone.