Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am in the need of converting a local SVN repository to GIT. I know how to convert a remote SVN repository to git, however, I only have the local repositories; they are no longer hosted. How would I go about converting a local SVN repo to git?

What I tried was this:

git svn clone -s file://data/svn/repo/ /data/git/repo.git

Error was:

E: 'trunk' is not a complete URL and a separate URL is not specified

share|improve this question

2 Answers 2

up vote 3 down vote accepted

Figured it out...

I needed an extra / after file:// so that it started at the root of the filesystem. Darn it!

Final command worked:

git svn clone -s file:///data/svn/repo/ /data/git/repo.git

share|improve this answer
1  
+1 I have experienced the annoyance of that missing slash several times myself. –  David Z Aug 24 '10 at 1:26

Another option is to use SubGit

$ subgit install /data/svn/repo/

The difference is that is also converts ignores, tags, EOLs-related settings, and the Git created is automatically kept in sync with the SVN repository. To break synchronization run

$ subgit uninstall /data/svn/repo

The resulting repository will br

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.