Gradebot User's Manual

Registration

  1. Register at the gradebot using your school email address. Follow the instructions there.
  2. Log in the gradebot. Complete your profile, including your photo and avatar. Verify that you have entered your correct student ID. Otherwise, you will receive zero score for every homework at the end of this course.

Learning git

Git is a version control system. It allows you to track and share changes to your code. Instead of having a single copy of your code, you'll keep a working copy that you edit, and send checkpoints of your work to a code repository. In this class, you'll be using Git to submit your programming assignments by checking it into a repository that the gradebot can also check out. This document will help you get started with checking out and checking in project code with Git for this class. You'll learn about other features of Git in discussion sections or by reading the resources linked at the bottom of this page.

Setup

To identify yourself to the repository to check out assignments and check them back in, you will need a private key. After you register, the gradebot will mail you the private key in a file named id_rsa. Keep this file safe with appropriate permission if you are on a shared machine. Anyone with access to this file can also access your code repository and read or make changes to your submission.

In a terminal, copy the key file into your ~/.ssh/ directory. The following instructions assume that you don't already have a private key.

  1. If you don't have a ~/.ssh directory (since you've never used SSH from this machine before), you'll need to create it. Run mkdir ~/.ssh.
  2. Copy your private key into the directory. From the directory where you downloaded the key, run cp id_rsa ~/.ssh/
  3. Set appropriate permissions for your files or SSH will complain. Run chmod -R go= ~/.ssh
$ mkdir ~/.ssh
$ mv id_rsa ~/.ssh/
$ chmod -R go= ~/.ssh
$ ls -l ~/.ssh
-rw-------  1 chen chen  1743 2010-06-17 18:07 id_rsa

Check out

You can check out from a repository using git clone, followed by the repository name. For example, to check out the first assignment, you would run git clone metastasis@gradebot.org:user/username/courseid/1, where username is your school email ID. You'll now find a directory called 1 that you can work on. If you get a prompt asking for your password, you made an error during set up and you should recheck your steps.

$ git clone metastasis@gradebot.org:user/chen/1/1
Cloning into 1...
Initialized empty Git repository in /home/gradebot/live/gitolite/repositories/user/chen/1/1.git/
warning: You appear to have cloned an empty repository.
$ 

If you get a warning about empty repository, ignore it, because your repository is indeed empty initially.

Check in

After you're done editing and ready to submit, you'll need to commit and push your code back to the server. You'll do that with the following commands.

  1. Enter the directory that git clone created.
  2. If you created new files, you'll need to add them explicitly. Run git add filename for each new file.
  3. Run git commit -a. It will prompt you for a comment associated with this check in. You'll want to write a meaningful comments to help you remember what you've changed since the last check in.
  4. Run git push origin master. This will send your changes to the remote repository, where the gradebot will grade it.

You can check in as often as you like. We'll only grade your most recent check in. You may wish to check in after any incremental progress, especially when working on the programming assignments.

Additional resources

To learn more about Git, you can visit the following websites.

FAQ