0

So the situation is this:

  • Started off with Git repo of codebase and made changes
  • Have to work with SVN repo of codebase

This question (Merge svn repo with git repo) is almost the same but it assumes working in Git as the final result. Could someone show a workflow that uses svn/git svn instead?

Community
  • 1
  • 1
Alex
  • 428
  • 4
  • 14

1 Answers1

0

CharlesB's answer in the linked question will get you started. svn2git creates a git repository that has branches linked to the appropriate SVN branches (it is possible to set up a SVN repository where this doesn't work, but assuming the SVN setup isn't terrible, it will work)

You merge your initial git repository into the git repository created by svn2git, and tell your git developers to use that repository (or a mirror of that) from now on.

Then you periodically use git svn to move changes to/from svn from your git repository.

git svn fetch will pull changes from an SVN branch into a branch in your git repository.

git svn dcommit will move changes from a git branch into SVN.

To your git users, the SVN repository will appear as the remote origin. To your SVN users, your git users will look like they are using SVN directly.

There is some overhead; it's not set and forget. New "public" branches can only be created in SVN, and you'll need to get quite familiar with the options of git svn.

antlersoft
  • 14,636
  • 4
  • 35
  • 55
  • Be careful with the restrictions of `git svn` if you want to send changes back. Some operations that are easy/natural in `git` are impossible in SVN. – vonbrand Mar 19 '13 at 20:04