I am planning a svn to git migration of a bunch of repositories. Two of them are in a particular state.
A project has been developped in a svn repo. Due to various constraints, the project has been forked at some point. The fork has been made by duplicating the svn repo. After that point, the two projects evolved separately. No branches or tags exist in either repo besides the trunk.
A significant functionality has been developed for the original project and needs to be ported to the fork. In the current situation this could be done by creating a patch from the various revisions and applying it on the forked project. This has the advantage of short term simplicity in the current situation but has a number of unwieldy consequences on the long term.
We could have two distinct git repos and do cross-fork porting via pull requests, but this could lack usability (we're not using github). Besides there may come a time where we might want to reintegrate the fork into the parent project thanks to modular design refactoring. Another approach would be to merge the two svn repositories into a single git repository as distinct branches, and manage subsequent merges from there (with all the advantages that it gives).
Ideally I'd like to recreate the true history of the project, that is have a git repo with:
- a single branch comprised of commits up to the fork
- two distinct branches comprised of parent and fork commits up to HEADs
An interesting fact that might help, the following command produces identical SHA1s for the common commits:
git svn clone -s -A svn.authors --no-metadata http://subversion.foo.local/repo/path git_migration I don't care about --no-metadata because it's a one-way migration.
How could I achieve such a result, if even possible?