I 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.
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.