Using git to submit your homework

Homework submission

For this course you will be using gitlab-csd to send your homework for grading. You could also use gitlab-csd to organize and store your code. This course uses the CS100 group on the department's github server. Each homework uses its own repository within the CS100 group.

You should follow the instructions below only the first time that you join the group.

  1. Log into gitlab-csd using your LDAP credentials (e.g., csdXXXX@csd.uoc.gr, with XXXX is your student ID number). You will initially be external users (without permission to create projects or groups, or rights to internal or external projects).
  2. Go to the "Group Tab".
  3. Selecte the "CS100" group
  4. Click on Request Access and wait until the TAs accept your request. This may take a few hours.
  5. When your request is accepted, you will become a member of the CS100 group as a Regular User. You will then have "Reporter" rights in the homework repositories.
  6. Once you are admitted into the group, you can create your personal access token:
    1. Log into the gitlab-csd using your LDAP credentials.
    2. Select your avatar on the top right corner of the page.
    3. Select Preferences.
    4. From the bar on the left, select Access Tokens.
    5. Choose your name, and optionally, select a date when the access token expires.
    6. Enable all check boxes.
    7. Select "Create personal access token"
    8. Save the personal access token in your computer. If you refresh the page or close the browser before saving the access token, then the token will be lost and you have to create a new token.
Before every homework: Every homework has its own repository in the CS100 group. Before you start working on each homework, you will have to Fork the homework repository into your own space in gitlab-csd. A fork creates a copy of the repository, into which you can add your changes, and the solution to the homework.

How to fork the homework repository:

  1. WARNING!!! Before you attempt to fork the repository of a given homework make sure you are a member of the CS100 group. If you are not a member, the system will not allow you to fork the repository.
  2. Log into the gitlab-csd using your LDAP credentials.
  3. Select the homework repository and click on "Fork".
  4. Select your name as the new namespace, where the repository will be copied.
  5. Make your repository private, and share it wiht the TA (Iacovo Kolokasis).
    1. Within the folder of each homework, there is a pyton script called private.py.
    2. Running this script (on a CSD computer) will make your repository private, and will add the TA as a member. Read the file README.md that is located within the repository for more details.

Clone the homework repository on your home PC or in your account in the CSD PCs:
  1. git clone https://gitlab-csd.datacenter.uoc.gr/csdp1039/...

How to commit your solution

  1. You will need to commit all the source files (not the binary or executable files).
    git add file1.c file2.c file3.c
    git commit -m "Commit message"
    git push
  2. On the day and time of the deadline, all solution repositories will be copied for grading. Any subsequent changes to the homework solutions will be ignored.

General tips for making good use of git:

  1. Commit often. Ideally, commit every time you solve a step of the homework, or more often.
  2. Commit only source files (.c extension), not executables.
  3. The commit message you use should be descriptive and explain the changes.
  4. Push the committed changes often into the server, as a way to backup your solution, in case your PC crashes or loses data.

Frequently Asked Questions

  1. Can I submit homework solutions after the deadline?
    No.
  2. Can I resubmit another solution?
    You can submit your homework solutions as many times as you want (before the deadline). All submissions are stored into the system, we will grade the latest tag.