Assignment Workflow #
This guide describes how to set up an assignment in CS 61BL.
Getting the Skeleton #
A video demo of this guide is available at this link.
Note that this video was recorded during the spring semester and there will be minor differences.
skeleton remote repository contains the skeleton code for all assignments.
Whenever a new assignment is released, or if we need to update an assignment,
you will pull from the skeleton. First ensure that you are in your
repository directory, then:
git pull skeleton main
This fetches all remote files from the repo named
is located at
https://github.com/cs61bl/skeleton-su23.git) and copies
them into your current folder.
If you get an error similar to
fatal: refusing to merge unrelated histories,
you can fix this each time by using
git pull --rebase --allow-unrelated-histories skeleton main
(If you’re working on Lab 1, go back to the lab spec at this point.)
Opening in IntelliJ #
The following instructions apply for every assignment. Each time after
skeleton to get new lab or project files, you will need to run
through the following steps again.
Start up IntelliJ. If you have no projects open, click the “Open” button. If you have a project currently open, navigate to “File –> Open”.
Find and choose the directory of your current assignment. For example, for Lab 1, you would select the
lab01directory inside your
Navigate to the “File -> Project Structure” menu, and make sure you are in the Project tab. Set your project SDK to your installed Java version. If 17 or higher isn’t available in the dropdown, make sure you downloaded and installed Java completely.
Still in the Project tab, set the Project Language Level to “17 - Sealed types, always-strict floating-point semantics”.
At this point, the Project tab should look something like this:
- The SDK is set to Java 17 or higher
- The Language level is at least 17, and at most the SDK.
- The Compiler output is filled in, and is set to the assignment
directory, followed by
Still in Project Structure, go to the Libraries tab. Click the “+ -> Java” button, then navigate to
library-su23, select the folder, and click “Ok”.
Click “Ok” to apply your settings and leave Project Structure.
At this point, if things have been configured correctly:
- Each Java file should have a blue circle next to its name.
- When you open any file, none of the code should be highlighted in red.
Submitting to Gradescope #
- Add your assignment directory using
git add. For example, for Lab 1, from your repo root (
su23-***) you would use
git add lab01. From the assignment directory, you could use
git add ..
- Commit the files using
git commit -m "<commit message here>". The commit message is required. For example,
git commit -m "Finished Lab 1".
- Push your code to your remote repository with
git push origin main.
- Open the assignment on Gradescope. Select Github, then your
su23-***repository and the
mainbranch, then submit your assignment. You will receive a confirmation email, and the autograder will run automatically.
Gradescope will use the latest version of your code from Github. If you think
that Gradescope isn’t grading the right code, check that you have added,
committed, and pushed with
If you’ve gotten yourself into a situation where you’re unable to push for some reason, see https://cs61bl.org/su23/guides/git-wtfs.