Exercise: Git Intro
#
Exercise 1Work with git on a simple pizza delivery algorithm file that covers the steps involved with ordering a pizza, and show how cool git can be with backing up our work:
Open terminal / command prompt / git bash on your computer
Set your name and email in git
Set your default git branch to main (We’ll get into branching in the next lecture!)
Next we need to generate an SSH Key to authenticate our connection to GitHub.
Create a folder named repos on your computer (this is where we will save all of our projects throughout the course)
cd into your repos folder
Inside of your repos folder, create a folder named PizzaAlgo
cd into that folder with terminal / command prompt
Initialize that folder as a git repository
Using the Visual Studio Code application, create a new file named Algo inside of your PizzaAlgo folder and save it.
Now we will add instructions for ordering pizza in this file
Use git to commit your changes as you add steps to the file
Once your commits are ready, go to github and create a new EMPTY repository named PizzaAlgo
Use the ‘new’ button on github:
Your repository should look like this
You will see a page that looks like this once created:
Make sure SSH is enabled and NOT HTTPS
Go back to terminal/command prompt, paste the text you copied from github and hit enter
Your github repository should now contain the Algorithm you worked on from your computer