tags:

views:

38

answers:

2

I'd like to replace my svn repository with git. Unfortunately I can't do this in one shot and to cut a long story short, I need to move an svn repository, with history, into a subdirectory of a pre-existing git repository. So I currently have:

svn:
svn1/
svn2/

git:
git1/
  .git/
  gita/

And I want:

svn:
svn1/

git:
git1/
  .git/
  gita/
  svn2/

Any ideas on the best way to do this?

A: 

You can clone the svn repo with git-svn to preserve history and then merge it with the git repo.

For example:

git svn clone path_to_svn_repo

This will create a new git clone of the svn repo. Now go to the directory with your git repo and merge the just-cloned as a normal git repo:

cd git-repo
git pull path_to_converted_git_repo
Michał Trybus
This seemed to work. I did something along the lines of the following:<pre>git-svn clone svn2git mv svn2dirs svn2/svn2dirsin a separate area:git clone git1git branch svngit checkout svngit pull svn2git checkout mastergit merge svngit push</pre>
A: 

Once you have two git repo, you can try link them together through grafts techniques.

VonC