Here are the account, text editor and shell you will use for the class.
- Register a GitHub account if you don't have one yet.
- Download Sublime Text.
- Download iTerm2.
- Using spotlight (
command
+space
), open iTerm2. - Install
homebrew
:-
Paste the following into your iTerm window. Hit enter:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
(A prompt will ask you to install Xcode. Say yes.)
-
After that, make sure brew is configured correctly entering:
brew doctor
You might get some scary-looking messages, don't fret, we'll pause and take a look!
-
brew install git
git config --global color.ui true
git config --global user.name "YOUR NAME"
git config --global user.email "YOUR@EMAIL.com"
Then:
- Follow the instructions here to cache GitHub password. (The password it asks for will be your system password.)
- Configure your SSH keys based on the tutorials (follow in order).
-
Preferences > Keyboard.
- fastest key repeat
- shortest delay
-
Create an alias so you can open files in Sublime Text from the Command Line.
ln -s '/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl' /usr/local/bin/subl
Q: How did we install and configure all the stuff above?
A: Command Line.
In fact, before there was click/double click/drag, there was the Command Line. Recommended reading.
cd
-- navigate to directoryls
-- list all the content in the current directorymkdir
-- make a directory within the current directorytouch
-- create a file within the current directorymv
-- rename/moverm
-- remove a file or directory within the current directory
Your new fam (in CLI):
.
-- you..
-- mom../..
-- granny
The many faces of cd
:
cd Docouments
-- go to Documentscd .
-- stay putcd ..
-- go one level back (to mom's!)cd ../..
-- go two levels backcd
-- go back to the root directory
Consult the frequently used commands listed above.
- Navigate to
Desktop
. - Create a new directory called
miceless
. - Navigate to
miceless
. - Create a new file called
name.txt
. - Open
name.txt
withsubl
.- What happens when you do
subl .
?
- What happens when you do
- Add your name in the text file, save it.
- Rename
name.txt
asmyname.txt
- Remove the text file.
- Navigate back to
Desktop
. - Remove the directory
miceless
.- Use
rmdir
orrm -r
.
- Use
What is it?
man git
Why are we using it?
In short, you are using git
to:
- to track your changes
You are using GitHub as a service to:
- see these changes in a UI, and
- collaborate with other people.
Put a git
on it.
In your website directory:
git init
ls -a
-- What do you see?
Look around:
git status
Find tips and cheatsheet in this doc.