Skip to content

Development Workflow

ramirezfranciscof edited this page Jan 26, 2017 · 53 revisions

The main repository of LIO (this one) will permanently maintain the two basic branches of the code: master and develop. We have master as the placeholder for the latest official release of the code, whereas develop is where new features are continually incorporated. This repository might eventually also host some release or hotfix branches, but these should be transitory.

If you want to contribute to our code, the first step is creating a github account (sign up here) and forking this repository (click "Fork" on the upper right corner of this page). The following sections contain basic descriptions on the 4 most important processes you will need to perform. Further knowledge on how git and github work is encouraged, but this should suffice for your first steps.

Cloning your repository

When you clone your repository, you make a local copy in your computer of all the information on your remote repository. This local copy is "linked" to the repository hosted in github so as to let you easily update changes in one or the other. This way you can not only keep those two synced, but also all your cloned copies in all your workstations.

The process of cloning a repository is described in the main page of this Wiki, and you could adapt that for your forked version and use it as it is. Here we will first describe how to set up a clone by using the ssh protocol instead of the https and then introduce some extra configuration steps. We present this alternative because is usually more secure and comfortable for development (to reconfigure a clone from https to ssh, check this link), but if you wish to keep using https just skip this first part and go directly to the second one.

Clone using ssh

You will first need and ssh keypair. You can check your keypairs by running ls -al ~/.ssh: they have the form id_blabla and id_blabla.pub (the private-key and public-key respectively). If you don't have one or you want to create a new one for this clone, you can do so by running:

$ ssh-keygen -t rsa -b 4096 -C "your_email@example.com"

You can accept the default location, but it is advisable to not leave the passphrase empty.

We will first then clone our repository by running the following command:

$ git clone https://github.com/user/repo local_name

This will set up a local_name folder in your current location and download there all the content of your forked repository (user and repo should be changed with your fork's information). The information here will stay linked to your github online repository via an https protocol, but it is possible (and recommended) to use an ssh protocol instead (for more information visit this page).

Useful configuration

Working in Branches

Updating Changes

Now enter your new directory and change your current branch (probably master) to develop using >$ git checkout develop. Create a new branch by running >$ git checkout -b newbranch and push it to your online repository with git push -u origin newbranch. Now you can work here, commit changes and push them to you forked repository as you please.

Sending your work

Clone this wiki locally