Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Let's say some time ago I checked out a SVN repo:

svn co http://example.com/repo

Now I have the folder $HOME/repo which contains .svn subfolders about the metadata of the repo in the whatever host.

Let's say that http://example.com goes down.

At this point, can I migrate my local SVN checkout to GIT?

The docs about svn2git migration only mention dealing with remote http repos, and the solution of serving my own repo via svnserve suggested here doesn't seem to work (svn: E210005: Unable to connect to a repository at URL 'svn://localhost').

So, should I lose hope?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

SVN is a server-based version control system. Locally you only have the version that you have checked out. Without access to the server you can't convert that to git and get the history, because you do not have access to that when you are offline.

It would be easy enough to add the working copy you have into git.

A simple method might to do something like this.

  • Create a copy of your SVN working copy and remove all the .svn cruft rsync -Cva current_wc/ new_wc
  • cd into the clean working copy and do a git init, and git add ., and git commit.
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.