I have a project that requires to port a Git repository to SVN. I tried several ways posted online, but none of them works for me. If someone can help, it'd be really appreciated.
I followed a guide on
- cloning a Git repo to a working copy
- going into the copy
- rewinding the head to the first commit
- cherry picking all the commits
- doing
git svn rebase
andgit svn dcommit
The problem of this method is that my Git repository has a complicated history. There are many branching outs and merges. When I did cherry pick, it only picks back part of the final repository.
Question: Is there any way to avoid cherry picking and git svn rebase
?
Maybe replace it with something else?
I followed this web post: Migrate a Git repo to an svn one
This post essentially
- did
git svn clone
- fetched the git repo in the cloned working copy
- branched the master to old_master
- applied all the commits from old_master to the master (
git svn rebase
) - did
git dcommit
The problem of this approach is similar to what I had in the first one:
When I did git svn rebase
, there are a lot of conflicts.
Also, when I skip all the conflicts, the git dcommit
failed.
It told me: Unable to determine upstream svn information from HEAD history.
I can't tell what else to try from this point on. Please give any suggestions if you notice anything I did wrong or have other ways to do it. Appreciated it!!