HOWTO set new SVN server in git-svn

These days, we migrated our SVN server to a cloud VM, and one of the needed tasks is to switch also my GIT repositories.

An easy approach is to rebuild them, but it has one major drawback: it is possible only if your GIT repositories don’t include uncommitted revisions.  In these cases, you will lose them all.

Since I have several unaligned GITs, I needed to look for a different approach.  After a short research, I reached this page.

The solution

The solution process is very simple:

  • edit config file in the .git folder.
  • add/update the below entries in the section [svn-remote “svn”]:
url = <new server URL>
rewriteRoot = <old server URL>

Then you are ready for your first dcommit.


Other useful links:

https://git.wiki.kernel.org/index.php/GitSvnSwitch