UIMA project logo
Converting project to GIT
Apache UIMA

Search the site

 Converting a project to GIT

This describes the various steps needed in converting a project from SVN to GIT.

File INFRA Jira ticket to convert read-only mirror to r/w

Tell the dev list this is happening, so people should not make any changes until the conversion is done. This may take 2-3 weeks, depending on INFRA workload.

Prior to doing the ticket, if you want the top level named "master" instead of "trunk", do that change in SVN, and let it propogate to the read-only mirror (if one exists). This will save time after the migration, because renames involve help from INFRA.

File INFRA Jira tickets for additional setup or fixups

If a rename is needed at this point for master/trunk, you'll need to ask INFRA to protect master after the rename, and to set it as the default (removing trunk as the default). Once INFRA does this, you can delete the old trunk.

Renaming Branches

In SVN, the main work goes into a spot under the name "trunk". The convention in git is to name this the "master".

GIT renaming cannot be done directly by users if the branch is "protected"; you must instead request it be done via an INFRA issue. This may take some time; see the kanban board on the INFRA jira to get a sense of how many other requests are in front of yours.

Therefore, it would be good to rename things yourself (e.g. in SVN).

Add .gitignore and .gitattributes

These files should be added to the top (outer-most) containing folder for the projects in your repo. They will be default apply to all subfolders. If you need to, you can override these settings in a subfolder.

Copy these files from some already converted repo.

Dealing with protected branches

The default, when converting a project from svn to git is to set "protection" for the master branch and things called refs/heads/rel/ and refs/tags/rel/.

The protection is described here: https://help.github.com/en/articles/about-protected-branches.

Individual projects within UIMA may request additional branch protection settings be set, via INFRA Jira issues.

Updating POMs for GIT

POMs have an <scm> element that points to svn, and it should be updated as follows:

  • For the connection:

    scm:git:https://github.com/apache/...proj-name.../...subdir...

  • For the developerConnection: This must point to the entire repository (no subdirs)

    scm:git:https://github.com/apache/...proj-name.../

  • For the url: this should point to the source code at github, e.g.

    https://github.com/apache/...proj-name.../tree/master/...sub-proj-name...

    For other versions, e.g. uima-v2, replace master with master-v2 (or the other version name)

Update the website docs to refer to the source at github.com/apache.