1

I have a git repo of a project that was started before an official SVN repo had been established. The git repo has a directory structure of something like:

docs/
src/
  herp/
  derp/

I want to push this into the existing SVN repo (in which others are working), so that the directory structure in SVN would look something like:

branches/
tags/
trunk/
  ... (other stuff) ...
  fizzbot/
    docs/
    src/
      herp/
      derp/

(since fizzbot is essentially a separate sub-project)

  1. I imagine this would be doable using git-svn, but I don't know exactly how.
  2. If I can do #1, is there a way to do it while preserving the history of all the revisions I made in the git repo?

Thanks in advance.

1 Answers1

0

I think the idea is that you need to:

  1. rebase/cherry pick all of the relevant commits on top of the git-svn (a svn repo checked out via git-svn) head, but the bigger problem is that you are effectively trying to

  2. merge two separate repos , that can be a little harder to get right. Although I have operated between git-svn repo and git repo that are related (i.e. the git repo is cloned from the git-svn repo), I have never attempted to merge a git-svn repo with an unrelated git repo this way, but in theory it should be possible provided you can resolve whatever merge conflicts that are likely to occur. The good thing is that once you can achieve -1- you are pretty much home-free and no real damage can happen until you do the dcommit (and even so there's the option of dry-run)

Community
  • 1
  • 1
prusswan
  • 6,853
  • 4
  • 40
  • 61