Getting Git Up & Going
Table of Contents & Resources
Basic Commands
TBD
Let's Get an IDE!
Reasons to use an IDE:
*
*
*
*
*
*
*
IDE Memes 😂
Getting Used to the Command Line!
Reasons to use the command line:
*
*
*
Basic Terminal Commands
mkdir
Make a Folder
cd
Open a Folder
touch
Make a File
Command Line in Action
Getting to the Terminal
CMD + Space "Terminal"
Demonstration
Getting xcode & homebrew
Steps to download xcode:
* Open up the terminal
* type in the following code:
(this will take a while)
sudo xcode-select --install
Steps to download homebrew:
* Open up the terminal
* type in the following code:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Basic Commands
brew doctor
Check in HB was installed
Lets Do This Now
Download Git
Reasons to use git & version control
*
*
*
Steps to download git:
* Open up the terminal
* type in the following code to the right:
brew update
brew install git
git --version
Check in git was installed
Basic Commands
Lets Do This Now
Using Github*
Reasons to use github*
*
*
*
*
*
Lets Do This Now
Generating an SSH Key
Reasons to use an SSH Key
*
*
*
Steps to generate SSH Key: (in terminal)
ssh-keygen -t rsa
Hit enter a few times...
no passphrase...
pbcopy < ~/.ssh/id_rsa.pub
Copies long-ass key to clipboard
Lets Do This Now
Adding your SSH Key to Github
Go to Settings
Steps
Click on SSH and GPG Keys
Lets Do This Now
Adding your SSH Key to Github
Click New SSH Key
Paste your public SSH Key
Lets Do This Now
Create a Local Project
cd desktop
mkdir newFolder
cd newFolder
Commands for git folder Setup
mkdir
cd
touch
Basic Terminal Commands
touch index.html
ls
git init
git status
git add index.html
git commit -m"initial commit and i added a new file"
make new folder
open folder
make new file
see folder contents
initialize folder
see what's up
stage file
commit (save) file
git push
after initial
Create a Local Project Video
Demonstration
Basic Git Commands & Background
Git is version control, it allows us to save our code in a safe place, and we can collaborate with other coders on the same project.
Version control is important so we can see what changes have been made, and when is was done, and by who.
This helps when things go wrong and we have to go back and save our project
GitHub also is a social network, that allows us to share our code with friends and employers
GitHub can also host our sites for free!
Think of Git, as the technology that SUPER SAVES our work, and gives us hints of our projects history when things go wrong.
GitHub is just the website that holds the code for us.
Look back at your own code and learn
Create a New Repository
Create a new repository
Follow the directions lol
Demonstration
Race Car Repo
Fork the Repo
Clone the Fork
Copy this line
Open terminal
cd desktop
git clone (paste the line)
cd (into the folder)
Lets Do This Now
Thats all folks!