2

Long story short, I have a git repo with several branches, and I would like to move it to an SVN repo while maintaining all of the branches and commit history.

So far I have not had much luck, most of the methods I have found do not migrate the branches as I would expect. (they are combined, or ignored, or eaten by a grue)

I was planning on using git-svn (git locally, SVN remote) and from the documentation I got the impression that using Git with SVN in this manner was very possible.. . but no idiot proof tutorial was provided!

Is this possible? if so how? If not what is it about git/svn do I not understand?

Toymakerii
  • 1,510
  • 2
  • 12
  • 26
  • 2
    Since git was made to replace SVN, I don't think there is a lot of support for this out there. – cmcginty Oct 25 '10 at 21:30
  • I have given up (can't dedicate too much time to this, I am going to merge down to one branch and then commit to the SVN (loosing logs and branches) However. I would like to leave this open as someone else might find a solution helpful. (Perhaps their repo is more extensive than mine is) – Toymakerii Nov 01 '10 at 14:59

2 Answers2

2

Did you check git2svn as detailed in question "Cloning a Non-Standard Svn Repository with Git-Svn"?
It could help for this kind of conversion.

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
1

I would not recommend pushing your git branches to a svn repo. When using git-svn, its typical that the git repo is a throwaway piece that helps to keep the svn repo clean and merge friendly.

The best practice, as I have found, is to merge your git branches and git svn dcommit just that branch to a checked out repository branch (don't checkout the entire svn repo). Then again, you can create a svn branch as your scratch branch for this and do a manual merge from that branch to another in svn.

Scott
  • 1,477
  • 12
  • 13