GitHub Management for Science Lab Groups

OctocatI am working to set up a collaborative workflow and version control system for our lab group. We generally have about 10 people and 2-4 that work on any given project. We’ve decided on git as our version control system and GitHub as our site for remote repository hosting.

Initially who ever was taking the led on a project would establish a repository on their personal GitHub account and add the other people as collaborators. Then each person would create a branch and merge it back into the master when a successful change was made (i.e. didn’t break the code). There are two primary ways of collaboration using GitHub. Our current model has been the Shared Repository Model. There is also the Fork and Pull model. As described on GitHub:

Fork & pull

The fork & pull model lets anyone fork an existing repository and push changes to their personal fork without requiring access be granted to the source repository. The changes must then be pulled into the source repository by the project maintainer. This model reduces the amount of friction for new contributors and is popular with open source projects because it allows people to work independently without upfront coordination.

Shared repository model

The shared repository model is more prevalent with small teams and organizations collaborating on private projects. Everyone is granted push access to a single shared repository and topic branches are used to isolate changes.

Pull requests are especially useful in the fork & pull model because they provide a way to notify project maintainers about changes in your fork. However, they’re also useful in the shared repository model where they’re used to initiate code review and general discussion about a set of changes before being merged into a mainline branch.

I am currently planning to create an Organization account for our lab group (differences in permissions for individuals and organizations). We will then likely use the Fork and Pull model of collaborations. The main advantage of the new setup should be having a centralized location for all of our groups projects and allowing for different levels of control (permissions) for various collaborators including those outside the immediate lab group. The Fork and Pull system also emphasizes what is contributed and who decides what gets merged into the master branch. It should help keep things organized among collaborators. It also makes extending the same framework easy for outside pull requests if other people fix or enhance our code and submit a pull request. This is one of the major goals of open source projects and open science.

I am new to collaboration through GitHub and would love to hear your experiences (pros and cons, tips, etc.). Please leave a note in the comments section with any thoughts or advice.




3 thoughts on “GitHub Management for Science Lab Groups

  1. Although I never actually used git to collaborate, I came across recently. It seems to fit the bill of what you describe in your post… maybe worth a look in case you do not already know it…

    • @Olivier – I found the SciGit blog post where they describe differences between them and other similar version control systems:

      It seems like they have a model that could be fantastic for most scientists because git/GitHub can be incredibly confusing for scientists who don’t do much true programming. My only concern is that they are new and don’t (didn’t?) seem to have a stable revenue plan, as they point out, and I would have to have a lab group switch only to have the system become defunct. I’ll be interested to see where they go from here.

      If anyone has any experience with SciGit please let us know in the comments. Thanks!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s