Setup Seaside and cse374

For this assignment, you must use your account on seaside.cs.washington.edu. See the Setup page from hw0 for more information about how to get started. We recommend that you use Visual Studio Code for this homework.

You should also have cse374 set up from hw1. See the Setup page from hw1 if you need help. Once you have mounted the ~/udrive/cse374 in ~/cse374, just cd ~/cse374 to work in that directory.

Setup Git on Seaside for git operations

Exercise 5 has detailed instructions on how to set up SSH keys to GitLab. You can ssh -T git@gitlab.cs.washington.edu to check whether you are on the machine with SSH key setup. If you see a welcome message, that means you are good to go. If you see a prompt about passwords, that means you need to redo the steps in that exercise to set up another SSH key on the machine.

Work in your own git repo

You should have cloned your own git repo from hw3. See the “Clone your own git repo” section if you need help. After cloning the repo, change directory to the local copy of your repository: cd cse374-23su-UWNetId.

Make sure your remote configuration is setup correctly by running git remote -v. It should output:

origin  git@gitlab.cs.washington.edu:cse374-23su-students/cse374-23su-UWNetId.git (fetch)
origin  git@gitlab.cs.washington.edu:cse374-23su-students/cse374-23su-UWNetId.git (push)
upstream        git@gitlab.cs.washington.edu:cse374-23su-students/cse374-23su-hw.git (fetch)
upstream        git@gitlab.cs.washington.edu:cse374-23su-students/cse374-23su-hw.git (push)

In this configuration, the origin (default) remote links to your repository where you’ll be pushing your individual submission. The upstream remote points to our repository where you’ll be pulling subsequent homework and bug fixes (more on this below).

Pull starter code from the upstream repo

Caution

If you have made any changes to your own repository, commit them before proceeding to the git pull. Otherwise, the merge step might fail.

You will need to pull updates from the cse374-23su-hw repository to get the actual files for hw4, and then upload it.

git config pull.rebase false # merge incoming changes
git pull upstream hw4
git push

When you pull the code, Git may open a text editor to allow you to specify a merge commit message; you may leave this as the default. Note that these changes are merged locally, but we will eventually want to push them to the GitLab repository (git push).

Note

if you have a newer version of Git, you might get a fatal: refusing to merge unrelated histories error. If so, please run the following: git pull --allow-unrelated-histories upstream hw4.

🎉 Congratulations! You have successfully pulled starter code from the cse374-23su-hw repository into your own repository. Now, you can cd hw4 and start working on hw4!

Tip

Commit early and often! Any time you commit and push your local changes, they will appear in the GitLab repository. Since you’ll be submitting the homework to Gradescope via the GitLab repository, it’s important that you remember to push all of your changes!