LARA

Fetching new files from our repository

We will usually give you new stubs and files for each lab. Instead of sending you the files and letting you merge them within your repository, we will use the machinery provided by git to do this.

We provide you with instructions on how to do that in the command-line (and alternatively in Eclipse if you have your git repository set up there):

Pulling from the Command Line

Setting the upstream remote branch

This operation sets a remote branch pointing to the main repository, files will be distributed through this main repository:

  git remote add upstream git@larasrv05.epfl.ch:cc2013-main

This operation needs to be performed only once for your local git repository.

Pulling new changes

Once the remote branch is set up, simply pull the new changes from that branch into your working branch (typically master):

  git pull upstream master

If you experience conflicts during the merge, fix the files by hand, then git add them and finally git commit the changes to resolve the conflicts.

Avoiding Conflicts

In case you fear pulling will result in a lot of conflicts, feel free to look at the code as it is on the main repository, by e.g. cloning it.

  git clone git@larasrv05.epfl.ch:cc2013-main

Alternative: Pulling within Eclipse

  1. Right click on the toolc project, got to Team .. Remote .. Fetch From…
  2. Select Custom URI
  3. As URI, use ssh://git@larasrv05.epfl.ch/cc2013-main
  4. Click Next
  5. Select “master” as Source ref and “choose_remote_name/master” as Desination ref, click Add Spec
  6. Click Finish

The commits and changes should have been merged into your repository.