Edited 7/13/21 by Christina, adapted from a post by our friends at SCRAP Lab:

What is git?

Git is a version control system that allows you to incrementally modify code and related text. This system allows you to easily how code was changed over time, rollback problematic changes, manage contributions from multiple collaborators.

What is GitHub?

Github is an online platform that provides git version control as well as many other features that can make software development easier. It is also a great place to share your code with the world.

GitHub for research

You can choose to use git/github for all of your programming needs, but be aware that there is a certain amount of overhead involved in creating a repository, and syncing it with local code whenever you make changes. This overhead time may not be worthwhile if you’re just writing a quick one-off script.

Also, git on its own is a poor choice to store anything but the smallest data sets. Look into DataLad for a great solution for data version control to complement git - it’s even developed right here in our own department!

Here are some cases where you should definitely be using git/github:

  • Working on a collaborative coding project involving any other person in the lab or outside of it.

  • Developing a software tool that will be used by other people.

  • Creating a large code base consisting of multiple interacting scripts, such as an analysis pipeline.

  • Developing software that you would like to be able to easily update over an extended period of time.

GitHub for professional development

It is a very good idea to have a github account with a few examples for your work available to the public. Many potential employers - both in and out of academia - will look at this to gauge your coding acumen.

Another valuable use of Github is to host your own personal website. Every academic should have such a website, regardless of seniority. Through Github pages, you can create one for free!

After you join the lab and create your own github account, you can request to join the lab GitHub so that you can collaborate more easily with others in the lab.