CS 161: Operating Systems (2016)

Tuesday/Thursday 1:00-2:30

Pierce 301

Home Syllabus Assignments Resources Piazza

Using code.seas.harvard.edu

We will be using git with code.seas.harvard.edu for turning in problem set submissions as well as version control.

What is Git?

Git is a distributed version control system. A version control system (or source code management system) is a tool for storing the source files of a project, distributing them to developers working on the project, and coordinating changes made during development. A version control system stores not just the current state of the project, but all past states as well. This makes it an important tool both for collaboration and for historical investigation. (Often finding when a bug was introduced makes it much easier to diagnose and fix it.)

A distributed version control system does all this without requiring a central master server. Instead, each copy of the project contains the full change history and copies can be synchronized with each other to share updates.

Git is one of several available distributed version control systems; it was originally developed by Linus Torvalds for development of the Linux kernel. For information on how to use git, see A Guide to Git.

What is code.seas.harvard.edu?

Code.seas is an online git repository and project management website for SEAS. We'll be using it for storing and submitting your work via git.

Signing up for code.seas

The following only needs to be done once. You may skip steps 1-3 if you already have a working code.seas account.
  1. Go to The code.seas login page.
  2. Enter in your FAS credentials. If you have neither FAS nor SEAS credentials, please see the course staff.
  3. You may be directed to an OpenID Verification page that asks you to confirm your identity. Click the "Allow Always" button on the right of the screen. You may then be asked to enter some details for your profile, but will eventually see your Dashboard.
  4. The next step is to add your ssh keys:

Code.seas Troubleshooting

If you can't access code.seas from your virtual machine, just reboot your virtual machine (this seems to be required frequently, especially if you change networks). If you are having any trouble with your keys (e.g., you cannot clone a repo because "the connection timed out"), check if your firewall is blocking port 22, and open port 22 if it is blocked. You can use your favorite search engine to figure out how to do this.

If you are having any trouble logging in, please follow these steps:

  1. Quit your browser -- (flush cookies).
  2. Try to login to code.seas with your FAS account.
  3. If that fails, you may need to change your FAS password and repeat steps 1 and 2.
  4. If that fails, email SEAS support at help@seas.harvard.edu and let them know your FAS and/or code.seas account name. They should be able to assist you.

Managing Assignments

The first week of the semester we will have you clone a repository so you can begin viewing and understanding the code. Instructions to do this are below. Throughout the semester you will be modifying your clone and submitting assignments by allowing us access to your repository. Periodically, we may need to provide updates to your repositories. In these cases, we will instruct you to pull from the master to your clone.

It's important that you have a mental model of how all these clones interact.

Creating and Managing your Clones

As noted, you will be producing your own little clone army. Manage them well!

Creating your Initial Clone on code.seas

You will do this as part of the first week's web work!
  1. Go to the os161 distribution on code.seas.harvard.edu
  2. Click on "clone repository". This takes you to a new page, which gives you a chance to name your repository clone. Keep the suggested name (username-os161).
  3. Click the orange "Clone Repository" button.
  4. After waiting for your repository to be created, you'll be at a page that contains information about your new repository. You're going to need the "Clone & push url" in a minute, so either copy the URL, or figure out how to get back to this page.
  5. On the right sidebar, click the "Manage collaborators" button.
  6. On the right sidebar, click the "Add collaborators" button.
  7. On the "Add a user" tab, type in cs161, and click on (at least) view and review, before clicking the orange "Add as collaborator" button.
  8. Once you form your team for assignments 2, 3, and 4, you will also add your partner as a collaborator.
  9. Back at the main page for your repo, click the "Manage read access" button on the right side.
  10. Because you cloned from a public repository, your repository is, by default, also public. Please click on "Make Private" to change the status to private.
At this point you've created a clone on code.seas.harvard.edu. Next, you'll want to create a clone on your virtual machine.

You now have a new folder called "~/cs161/os161", which contains the entire distribution for OS/161. Throughout the semester, when we want to distribute code to you, we will make it available in the os161-2016 repository. It will make things easier if you have a shorthand for that repo; you can set that up now by issuing the following command, on your appliance, from inside the os161 directory:

git remote add handout git@code.seas.harvard.edu:cs161/os161-2016.git
This allows you to access our repository using the name handout for the rest of the semester.

Submitting problem sets

Each time you begin an assignment, tag your repository with the tag asstN-start, where N is the number of the assignment. When you are ready to submit, tag your repository with asstN-submit. Create tags using the following commands:

git tag asstN-start
git tag asstN-submit
Note that you cannot tag uncommitted changes, so you will want to first commit all your changes, then tag your repository and then finally push your changes back to your clone on seas.harvard.edu by running:
git push origin master --tags
from your "os161" directory.

Please read the submit guide for more information.