git-svnsync ‒ Server-side GIT↔SVN synchronisation
Git-svnsync is a bi-directional server-side synchronisation tool between a git and a subversion repository.
It is based on hooks and it is designed to allow a smooth transition of projects from a subversion repository to a git repository. Git-svnsync guarantees that any branch update ('svn commit' or 'git push') is applied atomically in both repositories, thus providing a seamless experience to the developers.
General Public License v2 (or later)
- Home page
- Bug tracker (submission form)
- GIT Repository:
git clone https://scm.gforge.inria.fr/anonscm/git/git-svnsync/git-svnsync.git
- SVN Repository (yes we are self-hosted):
svn checkout svn+ssh://USER@scm.gforge.inria.fr/git/git-svnsync/git-svnsync.svn
- Make sure git-svnsync is in the PATH.
- You have an existing SVN repository to be migrated and a GIT bare repository whose content was filled with git-svn, both must be located on the same host.
- From the git repository, run: git svnsync init SVNURL ; this will install hooks for git (update) and for svn (pre-commit & post-commit). If any of these hooks is already present, then the new hooks are installed as HOOKNAME.git-svnsync and you will have to merge them manually.
- Your setup is ready.
- Both server repositories (svn and git) must be located on the same host
- Both repositories must have the same access permissions (at system level)
- For the moment only one branch can be synchronised (by default the master branch in git and the trunk branch in svn). You can choose different branches with the
--branch options of
- For each push on the git side, the tool creates only one commit on the svn side, even if multiple commits are pushed. The detailed history is only available on the git side.
- It is not possible to update both repositories in an atomic way. To overcome this issue, git-svnsync always makes the svn commit first and blocks all git pushes until all incoming svn commits are replicated. If this process is interrupted (power outage, or whatever reason) before the replication is completed you may be left with a git repository that blocks all pushes. Do not panic. You can trigger a new synchronisation either by making a new svn commit or by running git svnsync sync from the git repository.
- Apart from the initial import, git-svnsync does not interoperate with git-svn. Whereas git-svn stores its metadata in commit messages, git-svnsync stores them in git notes (refs/notes/svn). This design choice was necessary to allow syncing in both directions.