Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

svn co

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 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
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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .