Page tree
Skip to end of metadata
Go to start of metadata

SubGit is a tool for bidirectional Subversion and Git repositories synchronization. SubGit is written in Java.

Most commonly, SubGit user starts with Subversion repository being configured on the server. Access to Subversion repository is available over network (with HTTP(s), plain svn or svn over SSH protocols) and over the local file system. Correspondingly, users requests are handled by Apache Web Server, svnserve daemon or sshd daemon which invokes svnserve process. Figure 1.1 shows a generic outline of the described configuration.


 Common Subversion Setup

Figure 1.1. Common Subversion Setup

User creates Git repositories with SubGit and configures them so, that these repositories are kept in sync with the remote Subversion repository. Each Git repository mirrors one Subverion project (there could be multiple projects within a single Subversion repository). Changes pushed to the Git repository are instantly translated into Subversion project and vice versa - commits to Subversion project are reflected in the corresponding Git repository.

Optionally, user may enable revision properties on Subversion side by enabling pre-revprop-change hook in Subversion repository - this will let SubGit use single Subversion user account, but this modification is not required, so even Subversion repositories that you do not have shell access to could be mirrored with SubGit. Figure 1.2 shows typical SubGit set up that allows one to use both Subversion and Git and smoothes migration path.

During mirror initialization stage, SubGit translates existing Subversion revisions into a newly created Git repository. There is also a way to skip mirroring and only use SubGit for one-time import from Subversion to Git.

 Git Mirror of a Remote Subversion Repository created with SubGit

Figure 1.2. Git Mirror of a Remote Subversion Repository created with SubGit

Summary:

  • SubGit creates Git repository that mirrors project in a remote Subversion repositories
  • SubGit could be used for one-time import from Subversion to Git
  • Direct shell access to Subversion repository is not required
  • SubGit grants users with a choice of whether to use Git or Subversion and smoothes migration path
  • SubGit is implemented in Java and needs Java 1.5 or newer
  • No labels