7. Code Version Control

Version control systems are a category of software tools that help a software team manage changes to source code over time. Version control software keeps track of every modification to the code in a special kind of database. If a mistake is made, developers can turn back the clock and compare earlier versions of the code to help fix the mistake while minimizing disruption to all team members. This is very nicely explained on Atlassian tutorial pages.

We recommend to read the tutorial and download their cheatsheet which will provide an easy reference to look at, for the most common commands in git control.

7.1. Configuring Git SSH

Using git via SSH you will be able to update your repository without typing your username and password everytime.

In order to do this, you need to generate your own SSH key as documented at this page and then configure github and record your SSH key on your own github profile settings, as explained in this github page.

7.2. Cloning a Repository

Once you’re all set with SSH keys and configuration, you can follow these instructions to clone a repository.

Note

To work more comfortably, we recommend to clone your repository both on your laptop and on your HPC home. In this way you can conveniently edit the code on your computer using any editor or graphical interface you might prefer, commit and push the changes to the repository and then simply pull the changes on the cluster to update the code.