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.
- 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).
- Go to the "Group Tab".
- Selecte the "CS100" group
- Click on Request Access and wait until the TAs accept your request. This may take a few hours.
- 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.
-
Once you are admitted into the group, you can create your
personal access token:
- Log into the gitlab-csd using your LDAP credentials.
- Select your avatar on the top right corner of the page.
- Select Preferences.
- From the bar on the left, select Access Tokens.
- Choose your name, and optionally, select a date when the access token expires.
- Enable all check boxes.
- Select "Create personal access token"
- 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.
How to fork the homework repository:
- 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.
- Log into the gitlab-csd using your LDAP credentials.
- Select the homework repository and click on "Fork".
- Select your name as the new namespace, where the repository will be copied.
-
Make your repository private, and share it wiht the TA
(Iacovo Kolokasis).
- Within the folder of each homework, there is a pyton script called private.py.
- 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:
- git clone https://gitlab-csd.datacenter.uoc.gr/csdp1039/...
How to commit your solution
-
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 -
To mark which version of the solution should be graded, tag it
using:
make turnin.
Warning!!! Run this command in the directory you have cloned the repository of the homework, which includes a file named "Makefile". -
To submit another final version of the homework solution you
should run:
make undoTurnin
make turnin
Warning!!! Run this command in the directory you have cloned the repository of the homework, which includes a file named "Makefile". - 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:
- Commit often. Ideally, commit every time you solve a step of the homework, or more often.
- Commit only source files (.c extension), not executables.
- The commit message you use should be descriptive and explain the changes.
- 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
- Can I submit homework solutions after the deadline?
No. - 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.