Before reading this page, makes sure you’ve carefully followed the Example Assignment page.
In the rest of this page, we’ll use the git branches my-example
and example
, if you’re submitting a different assignment, simply replace those branches by the correct ones, e.g. for the first assignment it would be my-scalashop
and scalashop
.
If you’ve read the first few chapters of Git book as recommended, you must already be familiar with committing and pushing, but let’s go over the basics once again:
At any point while working on an assignment, you can see what changes you haven’t committed by writing:
git status
This will display the list of files you have modified since the last commit, to see the exact changes you made, run:
git diff
To save these changes in a commit, run: (replace "My message"
by a message describing the changes since the last commit, see How to Write a Git Commit Message for some tips on writing good commit messages)
git commit -am "My message"
You can then synchronize your local git repository with the gitlab server by running:
git push -u origin my-example
(If you’ve already done this once, you can just do git push
without arguments).
Note that there are also graphical user interfaces to interact with git, for example VSCode has built-in git support.
At this point, your assignment is not yet submitted! It’s just saved online, allowing you to access it from multiple machines.
When working on a git project with other developers, a typical workflow is:
The submission system for this class follows a similar model, except that your assignments will be reviewed by a bot instead of a human being.
For each assignment you will work with two branches:
example
is the branch containing the assignment, you cannot directly push to it.my-example
is the branch where you will write your solution.First, open a merge request from your my-example
branch to the original example
branch:
GASPAR
is replaced by your EPFL username).
Create merge request
on the top-right.Change branches
.Source branch
to my-example
and the Target branch
to example
.Compare branches and continue
.Submit merge request
.To grade your assignment, click on Edit
next to Assignee
at the top-right of the page, and select LAMP Review Bot
(do not assign someone else!).
At this point, the bot will comment to let you know it’s about to build your code, comment again to let you know if your code compiled successfully, and leave a final comment with your grade and detailed feedback on what tests failed, then unassign himself since its job is done.
If you obtained a score inferior to the maximum (10), you will be allowed to submit your assignment again:
git commit -a
).git push
).Don’t forget to assign the bot again each time, otherwise your assignment won’t be re-graded!
If you submit an assignment multiple times, we will keep the best grade from all your submission as your final grade.
You’re free to submit your assignment as many times as you want before the deadline, however, just like a real developer, the review bot is a busy person: he will only give you detailed feedback once per day, the first time you assign him. If you want more feedback on your code, you’ll have to write and run your own tests.
(Once you’re done with an assignment, you can either leave the merge request open or close it, this doesn’t matter for the grading system).
Cloning into 'cs206-example'...
GitLab: The project you were looking for could not be found.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
If you get the above message, you ever used the wrong clone URL or you recently created your account on gitlab.epfl.ch, please wait 15 minutes and try again.
Something is wrong on our end and it’s most likely broken for everyone: you can post on Moodle and/or try again later. To try again you will need to unassign the bot and then assign it again.