Github at CS - private instance

The school has its own instance of github at https://github.cs.huji.ac.il. All of the school's students and staff have an account there (using the normal unix login/password). This service is accessible world-wide, which allows to work on code at home and sync it to the cs network without the need for ftp or scp.

There are a couple of differences between the public github instance and CSE instance:

CSE Users can have infinite private projects, while on github.com only one is allowed in the free edition.

Projects can’t be shared as public for non cse users. Public projects will be available only to cse users.

For collaborative work with external users (public or private), they will have to open a CS account.

Initial setup

A one time procedure is needed to set up the git environment to work properly (such as setting up credential and setting the user data):

Inside the cs network

It is best to run the

github-setup

command. This will set up the local git configuration and the ssh id in the github so that a password won't be needed for each sync.

From home

The standard github instructions should work. In addition, to have the git submit command working, the following command needs to be executed:

After working on the exercise, to commit a well defined set of changes:

git commit -a -m"commit message"

The "commit message" should be a short (or multi-lined long) description of this commit.

To push the changes to github:

git push

This will make the changes available in github, but not considered as submitted yet

To submit the changes:

git submit

To see the local status of the git repository (local changes):

git status

To undo changes to 'afile.py' and restore from the last commit:

git checkout -- afile.py

Once the changes have been submitted, the submission will be processed and a mail will be sent once the process is completed (shouldn't be more than a few minutes, using the "bodek" system).

Important: The submission is through a special git protected branch "submit". Any advance git operations (rebase, reset --hard, merge, etc.) which might break the sync between the master branch and the submit branch, will require re-merging of them in order to work again.

For teachers

If you want to use github for assignment, please contact the system in advance, as opening the github's organization for the course needs a one time manual operation (per course per semester, not per assignment).

Some general details regarding using github for submissions:

The submission is to a special protected branch "submit", this means that once something is committed to that branch, it cannot be "uncommitted" and so you can follow to some extent the student's progress.

Due to technical reasons, each repository is started with an initial README.md file. This file is not needed and you can instruct students to delete it (or use it).

Each push to the "submit" branch (git submit) is logged and accessible through ~<course>/course-admin/gitdle/<assignment>/pushes/<student>

Using git will automatically use the bodek system, as this is the system that does the checkout. When submitting through git, the submitted tar file (taken out of git) will reside in the ~<course>/course-admin/ directory as usual, and it should be considered as the real submission (not the git's).

The repositories are not locked when the deadline has reached. Students can push changes there, but they won't be submitted to moodle (and the students will be notified by mail that their submission have failed).

There's one additional repository opened for push for the course's staff and for pull for all students. e.g. intro2cs-2016/ex1. You may use this repository to distribute some material for the students like initial files or some tests. You will have to instruct students how to initially pull the data into their repository and merge if there are changes. If these operation is required and you need help with the merging commands, please contact the system