Piazza

This term we will be using Piazza for class discussion. The system is highly catered to getting you help fast and efficiently from classmates, and myself. I encourage you to post your questions on Piazza.

Find our class signup link here

Piazza access code provided in class. If you missed it, ask the teacher.

Google Classroom

It will be used for exit tickets only. All other assignments will be submitted on GitHub.

Git

It is an open-source version control system that tracks changes in any set of computer files, usually used for coordinating work among programmers collaboratively developing source code during software development.

GitHub

It is a code hosting platform for version control and collaboration. It lets you and others work together on projects from anywhere.

Repositories (Repos)

Markdown & Documentation

GitHub supports Markdown for writing formatted documentation, which is commonly used in README files to explain projects. Markdown Cheat Sheet.

Installing Git

Mac and Linux: Git should be installed already.

Windows: Install git and the shell gitbash from here. This includes git, gitbash, and has shell integration so that you can right-click on a folder in Windows Explorer to access gitbash at that location.

Git commands

The git config command: Configuring user information used across all local repositories. The following commands set a name and an email address that are associated with each version history.

git config --global user.name "YOUR_NAME_HERE"
git config --global user.email YOUR_EMAIL_HERE

The basic commands we are going to use in this class are:

You may take a look at the git reference sheet.

Connect to GitHub with SSH

If you do not have a GitHub account, create one please GitHub (you may use any email to create your GitHub account).

Then, follow these steps to create an ssh key, connect to GitHub using SSH, and clone your repository.

  1. Create your ssh key: Open your terminal and type

    ssh-keygen -t ed25519

    It will ask you to enter a file in which to save the key. Do not type anything, just press Enter. The keys will be saved in the default path that it is displayed between parenthesis:

image

Then, it will ask you to enter a passphrase. Notice when you type this passpharase, it will not show up but you are typing. When you are done hit Enter:

image

Finally, it will ask you to enter the passphrase again to confirm:

image

Check if your keys were generated:

cd .ssh/ => Normally, this is the defauld path. Double check the path were the keys were saved in the previous steps.

ls => If using Windows and ls does not exist, try dir.

You should see your private key (id_ed25519) and public key (id_ed25519.pub) inside that directory.

  1. Log in to your GitHub account.

Click on your profile picture (right-top). You will see a menu; click on Settings.

You will see a menu on the left. Click on SSH and GPG keys and click on Add New SSH key.

You will give a title to that key. The key type should be "Authentication Key" and copy your public key (the content inside the file id_ed25519.pub) in the field "Key". Make sure you do not add spaces or blank lines.

  1. Go to the following link and test your SSH connection.

  2. Let's clone your repository on your local computer:

    Go to your assignments repository that you accepted for this class in GitHub (assignments repo must be accepted only once, check GC for to have the link). You will see a green button, "Code". You must click on that button and select SSH to have the appropriate link that will allow you to clone your repository and copy the link you see there./

  3. Create a folder CS_Foundations anywhere in your computer.

  4. On your terminal, go inside the folder CS_Foundations to clone your repository and type:

    git clone PASTE_THE_LINK_YOU_COPIED_FROM_GITHUB_(git@...)
    
  5. Go inside the folder that appears after you execute the clone command, and you will see the files you have on your GitHub repository.