Reputation: 169
I'm developing a software module for an application, owned by a customer with SVN-based development process. Up to now, I have been used my own Git repository in doing so.
Now, the module is mature enough to become part of the clients SVN tree. I did some git-svn based work in the past, but never with two initially independent repositories (the git part was always a clone taken from SVN).
Is it possible to 'inject' a standalone git repository into a Subversion repository and let also his history become part of the SVN's repo? After that 'normal' work with git-svn on top of SVN should follow.
Upvotes: 3
Views: 277
Reputation: 77620
I would suggest the following:
git svn clone
the Subversion repository
Add your existing git repository as a remote (let's call it mod
) in the git-svn repo
Fetch your module work into the git-svn repo and checkout into a new branch:
git fetch mod && git checkout mod/master -b mod-svn
Rebase that branch against the latest from subversion with git svn rebase
. At this point you should have a linear history with everything from Subversion followed by all your module work.
git svn dcommit
to save your module work into Subversion
Upvotes: 3