The purpose of this repo is to teach folk how to work with Git using the command line.
- git - the simple guide
- GitHub Bootcamp articles
- A successful Git branching model
- GitHub Glossary
- Git cheat sheet (PDF)
(If you're a Windows user then you'll need to install Git for Windows that seems to come with Git BASH)
- Sign up to GitHub
- Generate SSH key and add your public key to your GitHub account (here's how)
Commands we're going to use:
cd
- Change Directory. Used to change your current working directory.pwd
- Print Working Directory. Used to output the path of the current working directory.
-
Open your terminal and navigate to your projects folder. For example all my work lives in the
Sites
folder:$ cd ~/Sites $ pwd /Users/rey/Sites
-
Clone this repo:
$ git clone [email protected]:rey/git-101.git Cloning into 'git-101'... remote: Counting objects: 3, done. remote: Compressing objects: 100% (2/2), done. remote: Total 3 (delta 0), reused 3 (delta 0) Receiving objects: 100% (3/3), done. Checking connectivity... done.
-
Change to the
git-101
directory:$ cd git-101 $ pwd /Users/rey/Sites/git-101
-
Verify all the files are there and that we're chillin' like a villain:
$ ls total 8 0 drwxr-xr-x 4 staff 136 28 Feb 15:18 . 0 drwxr-xr-x 3 staff 102 28 Feb 15:18 .. 0 drwxr-xr-x 12 staff 408 28 Feb 15:18 .git 8 -rw-r--r-- 1 staff 793 28 Feb 15:18 README.md