OpenMRS Migration to GitHub

At a glance: OpenMRS is moving the code from our SVN server to a new Git repository on GitHub. If you have the openmrs code checked out on your machine, you will have to make the switch! See Using Git.

OpenMRS code has been self-hosted on a Subversion server for the last 7 years. That will change this week, when we switch to using Git for our version control system and hosting it on GitHub.com.

My first assigned task as the original programmer for OpenMRS was to install a Subversion instance on our single server. My second task was to commit the folder structure that Burke had started. At that point, we were able to claim “open source” and “collaboration” status. Everything we did from that point on was freely available to our partners.

Subversion (SVN) was only about a year old at the time, but was leaps and bounds ahead of the competition and was the easy choice for a version control system (VCS). However, we found ourselves wanting for features and looking around at other options recently. Git was released only a year after we started using Subversion, but the concept of a distributed version control system (DVCS) only took off in popularity a few years ago (of which Git is the most popular).

A typical VCS will have one main copy of the code that everyone works from. Forks are not welcome. Forks mean incompatibilities and lack of collaboration. In fact I remember having several long discussions early in OpenMRS where either PIH or Regenstrief wanted to start a custom fork for their specific changes. Thankfully we found ways to incorporate everything into core and keep everyone happy without forking. The module framework was introduced in late 2006 and ended once and for all (almost) any question of where you should put custom code for your implementation: a module. (The custom builds are a kind of fork, but meant to be short-lived.)

Distributed Version Control Systems (DVCS) on the other hand welcomes forks. There is still typically one “source of truth” in the master upstream repo, however, forks are welcomed and encouraged. Git makes it easy to merge and incorporate changes from forks back into the source of truth easily. This easy merging was the step missing in a typical VCS and the reason for the old VCSs discouraging forks. GitHub.com makes the process of creating, tracking, and merging forks even easier! GitHub is a nice melding of a Git server, project management, and wiki into a social-media-esque site. It has been the largest and most popular Git host for the last few years. This popularity adds to the desire for more projects and users to join and reap the benefits of communal Git hosting for even easier forking and automatic merging.

There are many reasons why we are switching to Git (and GitHub):

  1. Easier use in offline environments
  2. Ability to “commit” to a local repo without an internet connection
  3. Devs able to share commits and fixes between custom forks and merge those together easily later
  4. Automatic merging on github
  5. Better attribution of contributions

We have moved all OpenMRS-maintained modules to our github repo already. See: https://github.com/OpenMRS

All new modules will be hosted on github going forward. Current modules and contrib files are welcome to remain on svn indefinitely.

See these wiki pages for more information about the transition and how to get up to speed with the new technology:

OpenMRS Migration to GitHub

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Scroll to top