I am working on local git repository and I need to push my local git into existing svn repository. My git repository is pure local git repository, it was not init using git svn clone.
How can I import this local git repo into svn?
Preferably I’ld like to keep the git history being imported into SVN.
Currently the SVN repository is structure as:
https://svnrepohost
/branches
/tags
/trunk
/projectA
/projectB
/newProject
What I need it is to import my git repository into the https://svnrepohost/trunk/newProject above, assuming the newProject folder is empty.
I have finally solved this problem by the following steps:
Setup appropriate project folder in svn to be imported to, for example
http://svnrepo/svn/trunk/newProjectCreate a new git-svn repository
Add the git repo that we want to import as remote to the new git-svn repo
Pull all the data from original-git-repo
Rebase local repository against svn
Commit the changes into svn
Clean up the remote