Search code examples
gitsvngit-svn

How to convert a local checkout of a Subversion repo with local modifications with git-svn?


I checked out some SVN repositories and created a project out of them. After some changes and configuration I found out that I can use git for my SVN repositories. But the only way I found was to clone the repositories with git-svn. Since I already checked out the repositories and worked on them, I'd like to convert the existing repositories. Is it possible? What is the best way?


Solution

  • No, it's not possible. Local checkouts don't contain enough information (branches, tags, history). To convert SVN repo to git one needs access to SVN server or at least a dump from svnadmin dump.

    There are many tools and ways to convert SVN to git. See How to migrate SVN repository with history to a new Git repository?

    You create authors files that maps SVN login names to git format name <email> and run git svn clone.

    There are also other tools similar to git svn. There are svn2git (and fast-export), reposurgeon and other.