Skip to content

Computer Setup Overview

In the early lectures and posted video on WSL, we discuss how to set up your computer for this course. This is just a summary of the process for quick reference. For details consult the lecture slides and videos.

Linux Environment

For this course, you will use any Linux environment you choose. I will use a Debian-based distribution like Ubuntu, so you may want to do the same to match the examples.

Recommendations:

Install Software Tools

If you are using a Debian-based distribution, like Ubuntu, run the following commands.

bash
sudo apt update
sudo apt -y install build-essential git valgrind gnuplot

While you are at it, you may want to update any other outdated packages with this command.

bash
sudo apt upgrade

I recommend installing VSCodium as your text editor. It is Visual Studio Code, without all the propriety Microsoft stuff. If you are using WSL, you may either install VSCodium in WSL (in Linux) or install it in Windows and then use the Open Remote WSL extension to open any directory in Linux under WSL. I demonstrate this in the lecture on Basic Unix Commands.

Git

Most of all the assignments and resources will be accessed and submitted via the course repository.

  1. Install git in your Linux environment (as shown in the previous section).

  2. Set the global git configuration. Replace what is in the double quotes below.

    bash
    git config --global credential.helper store  
    git config --global user.name "Your Name"  
    git config --global user.email "you@student.csuniv.edu"

    WARNING

    Passwords will be saved as plain text on your computer.

  3. Create a GitHub account (if needed) and log in. Submit your username to your instructor via Blackboard (Lab 0).

  4. Create a GitHub Personal Access Token (Classic) to use as a password when pushing and pulling. (There are other authentication methods you may use instead, but public access tokens are the simplest to set up.)

    • I suggest selecting "No expiration" for the token expiration.
    • Select only repo as the scope of the token.

Set Up Personal Fork of the Repository

You are now ready to use the git repository for this course, which is hosted on GitHub.

  1. Click the email link to become a collaborator with the course repository.

  2. Fork the course repository.

  3. Clone your fork of the class repository.

    shell
    git clone <your_repo>
  4. Change directories to be within your repository.

    shell
    cd <your_repo>
  5. Set the merge method when pulling changes.

    shell
    git config pull.rebase false

Add the course repository as an upstream remote to your local repository.

A remote is a copy of the repository in a different location (usually a server) that you may pull updates from and push your committed changes to. You cannot push changes to the course repository, but, throughout the semester, you must pull updates from the course repository to your forked repository.

Adding an Upstream Repository
Adding an Upstream Repository
  1. In the command line, use cd to set the current working directory to the root of your repository.

    bash
    cd <your_repo>
  2. Check your current remotes. Before adding a new remote, you should see only two links that point to your fork on GitHub after typing this command.

    bash
    git remote -v
  3. Add the course repository as a new remote named upstream.

    bash
     git remote add upstream https://github.com/csu-cs/CSCI-315-2025-Fall.git
  4. Set the merging method for divergent branches.

    bash
    git config pull.rebase false # merge
  5. Confirm it is working by pulling the latest changes.

    bash
     git pull upstream master
  6. Save those updates (if any) to your fork on GitHub.

    bash
     git push

Add a Webhook to the Auto-Grader

See the instructions in Lab 5.

Golden 6 Commands of Git

CommandPurpose
initcreate a new local repository
clone <repo>make a copy of a repository
add <file(s)>add one or more files to the staging area (index)
commit -m "<message>save the files permanently in the version history with a message
pushsync the local repository to a remote repository
pullreceive content from a remote repository

Last updated: