Welcome to CS Foundations
-
Lesson 02 - GitHub
GitHub
Read the Git and GitHub documentation provided in the Tools section.
Remember the following GitHub actions
When you work on a machine you never worked before, you should clone your repo:
git clone SSH_GITHUB_LINK
Before you start working on any device, the first command you should run is:
git pull
When you finish your work:
- If you added new files and want to track the files, you must run the following command for each file:
git add FILE_NAME
- Commit the changes:
git commit -a -m "COMMIT_MESSAGE"
- Push the changes o GitHub
git push
-
Lesson 01 - Introduction
Welcome to CS Foundations!
Please carefully read Classroom and Lab Rules, and our grading policy here.
You may use the lab machines or your own computers during class.
Student Accounts
Each of you has an account on our main server.
You can use the lab computers to access your account.
The machines in the lab use the Linux (Mint) operating system.
Log into the computer
username: your stuy.edu username, without the @stuy.edu
password: OSIS + homeroom (eg. 1234567893qq)
Change your password to a strong password.
Follow these steps:
- Start a terminal window: click on terminal icon or press
control + alt + t
- Establish a connection to the the central computer:
$ ssh 149.89.17.91 <enter> Answer yes to the "Are your...?" question. The cursor will hide your typing while you enter... password: OSIS + homeroom <enter>
- Request a new password:
$ passwd enter Changing password for _____. (current) UNIX password: OSIS + homeroom <enter> Enter a new UNIX password: yourNewPassword <enter> Retype new UNIX password: yourNewPassword <enter> password: password updated successfully
- Log out
$ exit
- Start a terminal window: click on terminal icon or press
-
HW 03 - Double Checking GitHub
DUE DATE:The homework is the same as yesterday. If you have your SSH keys configured and your home machine is connecting to GitHub with SSH, you're all set, no homework for you today.
- Configure your machines at home to connect to GitHub with SSH.
- If you did not accept the assignments repo in class, please do it at home. This is the link. After accepting that assignment, you should have a repo created on your GitHub.
- Clone the assignments repo on your home machine:
- Go to your GitHub assignments repository that you accepted for this class. 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.
- Create a folder
CS_Foundations
anywhere in your home computer.- 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@...)
-
HW 02 - GitHub
DUE DATE:- Configure your machines at home to connect to GitHub with SSH.
- If you did not accept the assignments repo in class, please do it at home. This is the link. After accepting that assignment, you should have a repo created on your GitHub.
- Clone the assignments repo on your home machine:
- Go to your GitHub assignments repository that you accepted for this class. 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.
- Create a folder
CS_Foundations
anywhere in your home computer.- 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@...)
-
HW 01 - Forms
DUE DATE:Complete the following forms:
-
CW 02 - Evaluate Prefix Expressions
DUE DATE:Directions: On your notebook, evaluate the following expressions:
Expression Value 10 (+ 5 3 4) (- 9 1) (/ 6 2) (+ (* 2 4) (- 4 6)) (+ 2 (- 3 1)) (* ( + 1 3) (- 5 2)) (+ (* (- 4 (- 5 1)) 3) 2) (- 5) (+ 3) -
CW 01 - Hello World and GitHub
DUE DATE:The objective of this exercise is to create a txt file, add it, commit and push to a remote repository.
- In your local machine, go to the folder where your assignments repo was cloned ...../CS_Foundations/cs_foundations-assignments-YourUsername/ and create a folder classwork.
- Create a folder 01_hello_world inside the classroom folder.
- Write a txt file HelloWorld.txt that prints the message "Hello World!".
- Run
git status
. What does it show? - Add the new file to the repo
- Run
git status
again. What does it show this time? - Commit and push the file to your repo.
- Go to GitHub, HelloWorld.txt should be there.