Skip to content

Instantly share code, notes, and snippets.

@ogryzek
Last active August 29, 2015 13:57
Show Gist options
  • Save ogryzek/9592547 to your computer and use it in GitHub Desktop.
Save ogryzek/9592547 to your computer and use it in GitHub Desktop.

Introduction to Git & Github

Try Git | Markdown Cheatsheet | Pro Git | Git Config

Getting Started
In the terminal start by creating a new directory, then run git init to initialize a git repository

mkdir my_new_directory
ck my_new_directory
git init

Now that we have initialized a git repo, we can add files, and make edits, while trackin changes along the way. We can also revert back to previous 'commits' and merge branches. We'll go into detail about these terms mean and do shortly.

For this example, let's create a static website with a couple of pages, stylesheets, javascripts, and maybe even some fonts.

Tracking Changes
Create a file called index from the command line, then check its git status.

touch index.html  
git status  
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment