Why should I use Github?, a friend recently asked. I write code for my job and share scripts with colleagues. I think Github could be useful, but I feel a bit intimidated by the technical bits. I thought about it and replied with few tips that I learnt on the way. This is a summary.

stamps

Github essentials: you can fork a project and work on a new branch

Science relies in reproducible research, with carefully laid-out hypotheses, optimised protocols, rigorous reports that are peer-reviewed. Science is also about collaboration: “hey, did you manage to use the new cluster? how did you do that?”. For these two obvious reasons, sharing an R code or a bash command is quite useful if it involves some version-control, sharable system. This is what UCL recommends when publishing an article, and what I try to do with my colleagues.

Getting used to Github was not so easy at first, because it was quite alien to what I knew. I first used it to update a website: each learning step was often loaded with a small mistake that would inevitably crash the website. I frequently spent time to fix these bugs, with the immediate gratification of seeing the website working, and the long-term benefit of understanding git. Nowadays I find Github useful for my own personal website (read more here to make your own website).

I try to commit and push regularly in all my projects. This allows me to have a somewhat secure back-up of scripts if the end of times happens. I always talked about this in hypothetical terms, until I was deprived of HPC access for the whole month of May. I easily found my scripts on the remote repository and could play with ggplot. I have also stored some script templates that I can copy and paste easily off the website remote repository.

I currently use Github to understand the tools that I use, by looking at the source code or the comments of the issues. Some users might have had the same error message than me, and it is great to find a fix in the closed issue posts. I also keep an eye on few of my bioinformatic crushes (you can follow and star projects, organisations or users): what they are currently using might be the next big thing that everyone wants to use.

Lastly, there is this beautiful data visualisation on the front page of each user, showing moments of intense use of Github with little green tiles. It is nice to reflect on the past to see the big pushes. I know that it motivates some to fill in the blank too!