Using Github

Github is an online code repository that makes it easy for a group of developers to collaborate on a project.

The supporting developer need only “clone” a selected project. This copies the project to their own account. The developer can then make changes to their version of the code, then “push” those changes back up to the original project (via what is called a ‘pull-request’). The owner of the project can then accept or reject the suggested changes as they see fit.

Many developers use Git as a command line tool. At the command line Git is more powerful than through GUI. To get an understanding of Git’s basic commands see this good introduction.

The first step involves creating a Github account. Then, one can create a new repository or ‘clone’ an existing project. Polygon Door’s Artbot project can be clones from this page:

Github client

There are many ways that developers communicate with the Github code repository. Mane software IDEs (Integrated Development Environments) incorporate ‘git’ communication features.

To get started, however, an easy option is to download and install Github’s Desktop client.

Another good option is Atlassian’s SourceTree

Github use: uploading (on Github Desktop)

Once a repository has been cloned and downloaded to your desktop computer (click the “Open in Github Desktop” link), you can make changes and re-commit them to Github.

Screen Shot 2016-07-22 at 1.26.34 pm

The above image shows a change in the Artbot code. Github Desktop automatically identifies which files have been changed, and highlights those changes.

To do this requires 2 steps.

  1. Github Desktop will recognise any changes you have made. It will offer you a window for adding comments that describe that change. Once that description is entered, it must be “committed”. This “committing” simply changes the local repository: the repository as it exists on the local hard drive.
  2.  Once committed, that change must be ‘uploaded’ to the online repository. To do so, simply hit the “Sync” button (top right corner).

Github use: Syncing with repository.

To sync the local repository (the one on the user’s local hard drive) simply hit the “Sync” button.