2

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?

kostix
  • 51,517
  • 14
  • 93
  • 176
Thomas Sablik
  • 16,127
  • 7
  • 34
  • 62

1 Answers1

2

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.

phd
  • 82,685
  • 13
  • 120
  • 165
  • Is it possible to "clone" a SVN repository into an already existing SVN checkout as git-svn repository? As you said, the local checkout need some additional information from the server and I have access to the server. – Thomas Sablik Sep 15 '17 at 07:25
  • I don't think so. I'm sure `git svn clone` requires an empty directory. – phd Sep 15 '17 at 10:23