Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Add svn repo to existing git repo?

Tags:

git

svn

git-svn

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?

like image 814
rip747 Avatar asked Apr 14 '09 02:04

rip747


People also ask

Can you use Git and SVN together?

git-svn is a specialized tool for Git users to interact with Git repositories. It works by providing a Git frontend to an SVN backend. With git-svn, you use Git commands on the local repository, so it's just like using normal Git. However, behind the scenes, the relevant SVN commands are sent to the server.

Does SVN work with GitHub?

GitHub repositories can be accessed from both Git and Subversion (SVN) clients.

How do I clone a Git repository in SVN?

# Clone a repo with standard SVN directory layout (like git clone): git svn clone http://svn.example.com/project --stdlayout --prefix svn/ # Or, if the repo uses a non-standard directory layout: git svn clone http://svn.example.com/project -T tr -b branch -t tag --prefix svn/ # View all branches and tags you have ...


1 Answers

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.

like image 176
rip747 Avatar answered Sep 17 '22 16:09

rip747