Share Your Code With GitHub

By | April 26, 2015

Open science, open data and open publishing are all the rage right now, so why not open source your research and share your code with GitHub?

GitHub is an online platform for hosting and sharing repositories of the git version control software. If you’re not already familiar with it, version control is a process of keeping track of changes and alterations to files and documents. It’s generally used for software projects, but also comes up for book writing and learning materials.  Git itself is a relative newcomer to the version control scene, but has been helped by the fact it was designed by the man behind the Linux kernel, Linus Torvalds [spolier – he named it after himself…].

Git, github and version control are all big topics of their own. A really good place to start is the Software Carpentry resources on “Version Control With Git“.

Git and github are hugely powerful and flexible, but I tend to use them for the more modest reason of simply sharing my code. Once you’ve set up an account on GitHub and set up git on your machine, it’s dead simple to start making your code available online.

With your repository of code available online you can easily share your work with collaborators and the public at large. What’s more is that if they have a GitHub account of their own, they can easily fork your code, and start building and developing it themselves!

A free GitHub account offers unlimited public repositories, but if you want to maintain a private repository, you’ll have to take one of their paid-for accounts. For academic users GitHub helpfully provides, amongst other things, up to five private repositories for free.

Take a look at my github account page to see the kind of projects I’m involved with. To give you an idea for how I use it I have:

Finally, GitHub also now has the ‘gist‘ – a simple way to share code snippets with others.

So go ahead, see how easy it is to share your code with github!