CS61A Tutorial: Submitting Assignments

Here is a simple guide that will help you submit all your assignments for CS61A. Don't worry: it's easy!

The Basics

Before we begin to submit an assignment, we need to check for a few things:

  1. We are logged into our CS61A account (i.e. cs61a-bh).
  2. We have the files we need to submit in our account.
  3. We know what assignment we are supposed to submit.

To submit assignments for this class, we will use a simple command line program called—wait for it—submit. To start submitting an assignment, type submit, followed by the name of the assignment. When we are at the prompt, we should see something like this:

star [16] ~/hw1 # submit hw1
This means that we are currently in our homework 1 directory, indicated by ~/hw1, and that we are submitting the assignment hw1, the first homework assignment.

Tap return and you should then see
Enter you and your partner's gmail addresses.
Enter '.' to stop.
Enter email addresses one at a time, by typing and hitting Enter after each one. When you have entered each of them, the system will prompt for GMail again. At this point, please type '.' and Enter. It is fine if you and your partner only want to provide one email address; just note that only that email address will have access to the code review system.

The system will prompt for section numbers, and then logins (the complete login: cs61a-__), in the same way as before. You'll be fine! Just follow the same process as for the gmail addresses. If working alone, you need only input one of each.

Note: For the section numbers, we only need the last two digits (eg. if your discussion is 122 and your lab is 022, just type 22. If your section is 204, type 04).

Then you'll see:

Is this correct? [yes/no]

If any of the information above is incorrect, you have a chance to cancel your submission here (type no or n). However, don't worry too much because you can submit as many times as you want before the deadline. If it is correct, type yes or y. To finish up, the system should output:

Submission complete.

A cool feature is that the second time you submit, your previous entries are saved as defaults. You can escape retyping them (if the entries are what you want) by just typing Enter to confirm the shown defaults.

Few Simple Rules

Here are some simple rules that you need to know to make sure all of your assignments get submitted properly.


submit only accepts certain names for assignments, but they are easy to remember:

  1. hw#, for each homework assignment.
  2. proj#, for each project.
If you type in an incorrect name, submit will kindly remind you of all possible assignments.


submit is only trained to look for certain files depending upon the assignment. In CS61A, we will provide you all of the files you will need to submit for each homework assignment and project. If you try to change the name of the file that submit is expecting (or the file isn't there), submit will let you know what files need to be present for the submission to be successful.

Looking for files to turn in....
Turn in ./interesting_file.something?  [yes/no] yes
You must turn in a file hw1.py for this assignment.
Here is the complete list of files you must turn in:
Error: submission FAILED.
If you have subdirectories (that is, a directory within a directory), then submit will ask you whether or not you would like it to check those.
nova [32] ~/hw1 # submit hw1
Looking for files to turn in....
Look at files in directory ./Another_Dir? [yes/no] yes
Look at files in directory ./Another_Dir/And_Another? [yes/no] yes
Look at files in directory ./Another_Dir/And_Another/WHEN_WILL_IT_END? [yes/no] yes
Look at files in directory ./Another_Dir/And_Another/WHEN_WILL_IT_END/NOW? [yes/no] no
Skipping directory ./Another_Dir/And_Another/WHEN_WILL_IT_END/NOW.
Turn in ./interesting_file.something?  [yes/no] yes
Submitting hw1.py.
The files you have submitted are:
        ./hw1.py ./interesting_file.something
Is this correct? [yes/no] yes
Copying submission of assignment hw1....
Submission complete.

Some Tips

These will help you make the most effective use of submit.

  1. Remember that you tell submit the name of the assignment you are submitting, not the current directory.
  2. Whenever submit asks for [yes/no], typing in y is equivalent to typing in yes (and similarly, n for no).
  3. While you may submit from your home directory (~/), it is often best to create a separate folder for each assignment. This is to avoid having submit ask you if you would like to submit every, single, file in your current directory (including all hidden files used by Unix for its own purposes). Keeping your assignments organized by making separate directories for each assignment will make your life easier (i.e. proj1/, hw1/, etc.).
  4. If you want to cancel a submission while submit is running, issue the abort command with the key combination Ctrl-C.
  5. Finally, our submission system allows for repeated submits. We will always grade your last submission. Just make sure your last submission is done before the assignment deadline!
Remember, submit is a Unix program, so if you need any help don't forget to check out our Unix Tutorial and information on connecting to your CS61A account. You can also get a brief description of submit using the command submit -h.

If you have any other questions about submit or anything else CS61A related, don't forget to ask your friendly neighborhood staff or post on Piazza. ☺