tags:

views:

75

answers:

1

I have a SVN repository and I used:

git svn clone <svn url>

I have also created a repository on github. So every time I push the changes to github I would also commit the changes back to SVN.

git svn dcommit

Everything worked fine until my harddisk crashed. Now I need to restore a working copy of my source code. I can think of two ways of doing it:

  1. Clone the repository from SVN and add github as the remote. How do I add information about the github repository?

  2. Clone from github and then add the information about SVN manually? How do I add information about the SVN repo?

NOTE: I know the title of the question doesn't make sense. But I really don't know what to name it.

+1  A: 

I would go with option 1.

You could:

  • re-clone your svn repo into a Git one, generating informations about the SVN repo in your local Git repo

    git svn clone svn://my/svn/repo -T trunk -b branches -t tags
  • add github information by:

    git remote add github [email protected]:git_username/projectname.git
VonC
I think option 1 is actually the *only* way to go. I don't think it's possible to add the necessary git-svn metadata *after* commits have already been added to the repository.
Dan Moulding
@Dan: agreed. This is why I went with option 1.
VonC