Lab for Automated Reasoning and Analysis LARA

Programming Assignments Git Instructions

If you haven't installed git yet, refer to the Setup page.

These are the instructions on how to properly configure your programming assignments. These instructions will have to be followed again and again for each different programming assignment.

Creating the repository

The first thing to do once you start working on a new assignment is to create the git repository and switch to the project branch. This is done by issuing the following commands with the terminal located where you want your project folder to be.

cd /path/to/where/i/want/my/projects/to/be
git clone git@larasrv13.epfl.ch:funprog17-groupYY projectXX
cd projectXX
git checkout -b projectXX
git rm -r *
git commit -m "Remove all files"

Where YY is your group number. Your group number, as well as the entire URL can be copied from the grading website (larasrv13.epfl.ch).

And where XX is the the project number. For instance, for the first project, XX is 01.

Importing the Files to the Repository

Next, you need to add files from the handout to the repository. First, copy all the files from the handout to the folder projectXX. Your projectXX folder should contain the following files and folders:

.git/
assignment.sbt
build.sbt
project/
scalastyle/
src/

Note that the .git folder might be hidden. Please make sure you follow this project structure exactly ! Otherwise, the grading infrastructure will reject your project.

Then, you should issue the following commands:

git add .
git commit -m "Import the initial project files"
git push --set-upstream origin projectXX

Where XX is the project number.

Working on your project

Now you can work on the project. Please refer to the instructions on ''sbt'' to learn how to compile and test your code locally.

Sending your Files to the Server

Once you have a version of your code you want to test and/or deliver on the grading website, issue the following commands:

git commit -a -m "MESSAGE"
git push origin projectXX

Where XX is the the project number and MESSAGE is a custom message describing what was done since last commit. For instance, it could be:

  1. Correct bug on exercise 3
  2. Implement part 4 of the exercise 2
  3. and so on… These are just examples; it could also be something much better.

Every single time you want to submit your code to the server, the previous two commands should be entered. Note that this will not automatically deliver your code on the server. You still need to manually deliver through the web interface.

Submitting a Deliverable

Once you have a working solution, you should deliver it for grading. To do so, click on the Deliverables tab on the website. Indicate the commit number of the solution you want to deliver. This number can be obtained from the grading website itself, or by typing the following command in the repository folder:

git rev-parse HEAD

You can submit any number of times before the deadline. Only the last submission will count.

Note that we will not grade any solution that was not delivered!

 
funprog17/git-setup.txt · Last modified: 2017/09/22 12:36 by romain
 
© EPFL 2018 - Legal notice