Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents



The OpenMRS community is currently in the process of evaluating Git as a replacement for SVN.



When creating a new module or contrib, please e-mail ? to request a module ID or contribution name, including your OpenMRS ID, a description of your module/contribution, and your proposed module ID or contribname.  The conversation with the "code" e-mail group is used to avoid duplicates and maximize consistency of naming; you should expect a module ID to be decided within one day of your request.  Eventually, we hope to create a more automated process for ensuring uniqueness of module identification & awareness of existing modules.


Copy the list of authors from ?Github Authors txt/wiki/spaces/docs/pages/25520562 into an authors.txt file and from that folder, start with:



If you get an error from svn2git, it's possible that one or more users are missing from the authors.txt file.  Checkout a local copy of the module from svn and list out all authors who contributed to the module:

Code Block
$ svn log --quiet | grep "^r" | awk '{print $3}' | sort | uniq

Make sure each of these users has an entry in the authors.txt file.  If anyone is missing, then find their corresponding git name and e-mail (if you cannot find these, e-mail the dev mailing list and ask for help). 

NB  Other alternatives to svn2git  include;

  1. svn-git

                Git comes with a pre-installed tool called    svn-git  see

                svn2git is just a wrap up tool around git's svn-git , and  it makes using svn-git more easier and flexible .However in some cases , it may be better to use svn-git directly

       2. The github Importer

               The github Importer is also a great and easy to use tool to use for conversion and migration of repos  from svn to git


Once the complete project is converted from svn to git format, you need to get it up to GitHub.

  1. Create a new repo in Github (or ask for one for the OpenMRS org from
    1. Name: openmrs-module-yourmoduleid
    2. Description: a one-line description of what the module does (look at others for examples)
    3. Make it public
    4. Initialize with a README
    5. Add .gitignore for maven
  2. Edit the module's pom.xml to use the github address

    No Format

  3. Change the local repo you just converted to point at that one github repo "origin" (below)

    Code Block
    $ git remote add origin

    Code Block
    $ git pull origin master

  4. Assuming that your module uses the OpenMRS license and it wasn't already in subversion's root, add it:

    Code Block

  5. Commit your changes locally

    Code Block
    $ git add .
    $ git commit -m "migrating from svn to github"

  6. Push the code to github (below)

    Code Block
    $ git push

    Push the tags manually using the following command.

    Code Block
    $ git push --tags

  7. Add default teams to the new github repository:
    1. Full Committers
    2. Partial Committers
    3. Repo Owners
  8. Under the Admin section for the new github repository, make sure Wiki & Issues are unchecked (we don't want wiki & issues going into github; rather, we want people using and


It's preferable that older modules be mavenized prior to migrating to git, since it significantly reduces the size of the repository, making it easier for low-bandwidth developers to clone the repository locally.  If your module is not yet mavenized, see ?Converting old code to Maven.

For Mavenized projects, IDE specific files should not be included in the repository. Git supports an ignore file similar to SVN called .gitignore, and so for a typical mavenized module project this will look like:


We have a shared authors file. Please use and add to this as needed: Github Authors txt /wiki/spaces/docs/pages/25520562!

IDE integration

Include Page
Git IDE Integration
Git IDE Integration

Best Practices

Here's the set of best practices to follow in distributed OpenSource projects.