Step 6.5 of 7 - Windows Setup


This guide will walk you through the process of setting up your Windows laptop for coursework at LearningFuze. The steps need to be completed in the order provided. There are some video clips, pictures, and commands in this guide, but be sure to read all instructions thoroughly so you don't accidentally skip a step.

Check System Requirements

First check to make sure that your Windows laptop meets these system requirements:

  • Computer* less than 4 years old (depending on how fast it is)
  • 64-bit Intel or AMD processor
  • 8GB RAM minimum, 16GB recommended
  • 16GB of free disk space minimum
  • Windows 10 version number 2004, build 19041 (or later) or windows 11

*A laptop is required for in-person LearningFuze courses.

If your Windows 10 version is older than version number 2004, please update it now before continuing.

You can verify your version of Windows 10 by following these steps. You can update your version of Windows using the built-in Check for Updates app.

Install Git Bash

At LearningFuze, you will use Git and GitHub to turn in your coursework, just like a professional developer.

To download your code from GitHub, you will need Git Bash installed. You can get the 64-bit Git for Windows Setup from the official Git website.

Once downloaded, run the installer. There are a lot of screens, but just click through the prompts. At the end, ignore launching Git Bash and viewing the release notes by unchecking the boxes.

Install Visual Studio Code

At LearningFuze, you will use Visual Studio Code to edit your code.

To download Visual Studio Code, go to https://code.visualstudio.com/download. Make sure to download the Windows Installer.

Once downloaded, run the installer. There are a lot of screens, but just click through the prompts. At the end, ignore launching Visual Studio Code and viewing the release notes by unchecking the boxes.

Generate an SSH Key

After installing Git Bash, you will need to generate an SSH key in order to authenticate yourself with Github.

  1. Open Git Bash
  2. In Git Bash, paste the following text, replacing the email used with your Github email address

    ssh-keygen -t ed25519 -C "your_email@example.com"
    
  3. Press Enter to accept the default location.

  4. Press Enter to accept the default passphrase.
  5. Press Enter to accept the default passphrase again.
  6. Your SSH key pair is now generated.

Add SSH Key to GitHub

Once your key has been generated successfully, proceed with the following instructions.

Open the Git Bash app and paste in the following command, then press Enter.

cat ~/.ssh/id_ed25519.pub

Your SSH public key for GitHub should print, like in the video below. This key was created during the setup script and will be used to authenticate your laptop with GitHub so that you can freely download and upload your code.

Sign into your GitHub account and go to https://github.com/settings/keys. Click New SSH key on GitHub. Give the new key a name that will remind you which computer you pasted the key from. Copy-paste your key from Git Bash into GitHub and click Add SSH key. If given the option, choose Authentication Key as the Key type.

To confirm that your SSH key was properly added to GitHub, go back to the Git Bash and paste in the following command, then press Enter. Because this is the first time that you are connecting your laptop to GitHub, you will likely receive a confirmation message asking you if you want to continue connecting. Type yes and press Enter. After that, you should receive a message confirming that you've successfully authenticated.

ssh git@github.com

Add your name and email address to Git

After your SSH key has been successfully uploaded to GitHub and you have verified that your PC authenticates successfully, update Git to remember your name and email address. This should be your full name and the email address you used to sign up with GitHub.

Enter the following commands into Git Bash to set your name and email address, but use your own name and email instead of the example.

git config --global user.name "Joe King"
git config --global user.email "joe@email.org"

You can check for typos with the following command. You may see some other values print, but the most important things to check are your name and email address. You can fix typos by running the above commands again.

git config --global --list

Clone your solutions repository from GitHub

When you signed into the Learning Management System, a new repository was create for you on your GitHub account. If you visit your profile on GitHub and then go to the Repositories tab, you should see it.

The repository will be named xxxx-code-solutions where the xxxx is your cohort number. For example, if student was enrolled in our Web Dev Prep Class for October, 2020, their repository was named prep-1020-code-solutions. Your repository's name will be similar, but slightly different depending on which class you are enrolled in.

Note: If you cannot find your repository on GitHub, stop and notify an instructor via Slack.

Create Directory

Before you clone your repository, we recommend creating a directory that will store all of your various repositories, so you can easily access them. Open Git Bash and run the following command. You can replace repos with whatever you'd like your directory to be called.

mkdir repos

To clone

In this step you are going to download a copy of this repository onto your computer.

  1. Be signed into your personal GitHub account at https://github.com
  2. Go to your Repositories page
  3. Find your code solutions repository and click on it
  4. Open Git Bash
  5. Navigate to the directory you created in the previous step.

    cd repos
    
  6. Back on your repository page, click the Code button and copy the SSH URL from your repository.

  7. In Git Bash, run the following command:

    git clone <sshUrl>
    
    1. Ex: git clone git@github.com:shawnkost/javascript-prep-0125-code-solutions.git
  8. Open the Visual Studio Code app

  9. Go to the File menu.
  10. Go to Open Folder...
  11. Navigate to your repos directory and select your repository.
  12. Wait a moment.
  13. Once it opens, you should see the files in your repository.

Great! If you ran into problems, please contact an instructor via Slack. Otherwise, you have successfully cloned your repository!

Closing and reopening your solutions repository

This section of the guide shows you how to open your solutions back up after you have closed them. Visual Studio Code keeps a history of which repositories, files, and projects you have opened. You can see by following these steps.

  1. Close Visual Studio Code.
  2. Reopen Visual Studio Code.
  3. Go to the File menu.
  4. Go to Open Recent...
  5. Choose your recently-closed code solutions repository.
  6. Wait a moment.

Nice! Your repository should open back up again. This time it should open much faster. Any time you want to return to your solutions repository, you can get to it via File > Open Recent....

Finish up! ➡️

Let's do a review!