GitHub’s “Organizations” for distributed #bioinformatics dev; migrating from Mercurial

GitHub.com’s “Organizations” is a great tool for distributed bioinformatics teams. Here’s how I migrated some of our repositories from Mercurial to Git to take advantage of this feature

After much evangelizing, weeping, and wailing, I finally convinced everyone at one highly geographically and functionally distributed projects that we should at least try consolidating our code in one place.

Currently we have old legacy repositories in CVS, mid-range projects in SVN, new development in Git and Mercurial, and AFAIK a bunch of code in no SCM system at all.

Given that DVCS doesn’t have the directory level granularity of SVN, we definitely don’t want to consolidate everything in a single repository. So far, it seems that GitHub offers the best solution with its “Organizations” feature. This lets a team group multiple repositories under a single umbrella with a shared news feed and administration. Perfect.

hg-git looks like a useful tool if you want to maintain code in both git and mercurial. I don’t. Here’s how I handled a full-scale migration of our repositories:

todd> cd ~/projects
todd> git clone http://repo.or.cz/r/fast-export.git
todd> mkdir new_git_repository ; cd new_git_repository
todd> git init
todd> ../fast-export/hg-fast-export.sh -r ~/projects/old_hg_repository
todd> git checkout HEAD
todd> git remote add origin git@github.com:[organization]/[reponame].git
todd> git push origin master

Bing! And you’re done. Or whatever.

A Worthy Mercurial (hg) Tutorial from Joel Spolsky

At WormBase, we’ve been busy re-writing the website from the ground up to build a modern information discovery space that will generically handle genomic data.

As the project manager, I made the executive decision to switch from CVS/SVN to a distributed version control system (DVCS). I’d used both git and mercurial personally for over a year and enjoyed their flexibility.

And given the already distributed nature of our project, DVCS was a natural fit. (In fact, I believe that DVCS should be roundly adopted across the genomics/bioinformatics research sector precisely for this reason).

Nonetheless, for small teams accustomed to the quirks of SVN, the transition to DVCS can be a rocky road. Recently I came across Joel Spolsky’s excellent HG Init: Mercurial Tutorial.

If you’re considering or in the process of switching to Mercurial, I highly recommend checking out Joel’s tutorial and circulating it to your team.