Add svn repo to existing git repo?

rip747 picture rip747 · Apr 14, 2009 · Viewed 24.9k times · Source

I know you can track a svn repo with git by using git svn init, however that is for if you want to create a brand new repo.

My situation is that I currently already have an existing git repo and want to track the trunk of a svn repo by making it a remote branch in my current git repo.

Any suggestions?

Answer

rip747 picture rip747 · May 8, 2009

After searching last night, I have finally found the answer:

http://i-nz.net/2009/01/15/selective-import-of-svn-branches-into-a-gitgit-svn-repository/

It seems that you have to actually go in and manually edit the .git/config file in order to add an svn branch to an existing git repo. So according to these instructions I would have to add an entry for each branch.