Setup

Create your Chickadee

Follow these steps to create your personal Chickadee repository. You’ll clone that private repository onto your computer, do work there, and then push your work upstream to GitHub for us to grade.

  1. Visit our GitHub Classroom link: https://classroom.github.com/a/MCb7CRUV

    • Log in if prompted.

    • Accept the assignment. This will create an empty repository with a name like CS161/chickadee-s25-YOURUSERNAME.

    • Refresh the page until the assignment repository is ready. This may take a while, and you may see a “500 Error” at first.

  2. Create an local copy of your (initially empty) repository.

    • Visit your repository’s web page, which will have a link like https://github.com/CS161/chickadee-s25-YOURUSERNAME

    • Copy the repository’s SSH link, which will look like git@github.com:CS161/chickadee-s25-YOURUSERNAME.git

    • Clone the empty repository to your computer.

      $ git clone git@github.com:CS161/chickadee-s25-YOURUSERNAME.git
      Cloning into 'CS161/chickadee-s25-YOURUSERNAME'...
      warning: You appear to have cloned an empty repository.
      
  3. Add a Git remote to your repository for our handout code. This will use Git’s distributed features to allow you to merge our updates with your code.

    $ cd CS161/chickadee-s25-YOURUSERNAME
    $ git remote add handout https://github.com/CS161/chickadee-s25
    

    This command creates a new shorthand name, handout, for our handout code repository.

  4. Merge our latest handout code with your repository.

    $ git pull handout main
    remote: Enumerating objects: 9, done.
    remote: Counting objects: 100% (9/9), done.
    remote: Compressing objects: 100% (9/9), done.
    remote: Total 9 (delta 0), reused 9 (delta 0), pack-reused 0
    Unpacking objects: 100% (9/9), 5.23 KiB | 669.00 KiB/s, done.
    From github.com:CS161/chickadee-s25
     * branch            main       -> FETCH_HEAD
     * [new branch]      main       -> handout/main
    

    This command loads our current handout code and then merges it into your repository. You’ll run something like this every time we release or update a problem set.

  5. Store the resulting code in GitHub so you don’t lose work.

    $ git push
    Enumerating objects: 9, done.
    Counting objects: 100% (9/9), done.
    Delta compression using up to 8 threads
    Compressing objects: 100% (9/9), done.
    Writing objects: 100% (9/9), 5.25 KiB | 2.62 MiB/s, done.
    Total 9 (delta 0), reused 0 (delta 0), pack-reused 0
    To github.com:CS161/chickadee-s25-YOURUSERNAME.git
     * [new branch]      main -> main
    

    If you visit the Web page for your private GitHub repository, you should now see our handout code.

You can invite other students or TFs to see your code using the repository’s Settings > Manage access. Remember, though, that you must not share your solutions in a public place.

“Dubious ownership”: Within Docker, git commands may report messages like this:

fatal: detected dubious ownership in repository at '/home/cs61-user/cs61-psets'
To add an exception for this directory, call:

git config --global --add safe.directory /home/cs61-user/cs61-psets

It is safe to run that command if prompted to do so.