Dark theme

GitHub Quickstart

These pages introduce GitHub. GitHub is a website for storing code. It offers storage space, collaborative tools, and version control (the ability to backup versions of code and revert to them). However, it also offers a great deal more, including free webspace for individuals and projects, and a variety of data display options. Provided everything you do is Open Source and matches their rules of use it is free for use.

In terms of interacting with GitHub, most of it is founded on Git, a version control and collaboration system. You have two choices: either the desktop software built by GitHub (easy to use and good for day-to-day use) or the command line version of Git (more powerful, and good for building into scripts for automation). The following materials cover both, but you should probably decide to start with one or other. You can always swap or use both later.

For the sections on resolving conflicts, it is easier to work in pairs, but there is no need for both to be working with the same interface.

Desktop:

GitHub practical
This walks you through the basics of the desktop software: setting up an account; tracking changes; pushing code to GitHub; pulling from GitHub; sorting out conflicts; advice on passwords; and using GitHub to build a free website.
Python debugging practice
The last three sections of this site: Unit Tests; Code management; and Continuous integration walk you through fuller GitHub project management, including making Branches and issuing Pull Requests in GitHub, along with using Travis with GitHub for continuous integration (that is, a workflow where you test your code as it is pushed to GitHub so only code that works is built into projects). There's no GitHub in the Unit Testing bit, but you'll need it for the Continuous Integration section.

Command Line:

NB: On Windows the command line version can now be found by installing the desktop version above and selecting CTRL + the single quote key. This will initially get you to install Git. Alternatively it can be downloaded for all systems from Git directly.

Software Carpentry materials
A very good set of materials from the Software Carpentry group, that walks through the basics including: setting up an account; tracking changes; pushing and pulling to/from GitHub and resolving conflicts. Once you've worked through this, you should definitely check out the desktop tutorials (especially the page the most important thing about GitHub) and then use the following to implement the behaviour at the command line:

Some repo examples: