layout: slide
title: ''
tags: ['chapter-name']
-categories: ['slidecontent']
---
layout: slide
title: How do I test it?
tags: ['api']
-categories: ['slidecontent']
---
# Anonymous
layout: slide
title: What URL do I use?
tags: ['api']
-categories: ['slidecontent']
---
$ curl -n https://api.github.com
layout: slide
title: What can it do?
tags: ['api']
-categories: ['slidecontent']
---
$ curl -n https://api.github.com
layout: slide
title: What can it do?
tags: ['api']
-categories: ['slidecontent']
---
$ curl -n https://api.github.com
layout: slide
title: What can it do?
tags: ['api']
-categories: ['slidecontent']
---
$ curl -n https://api.github.com
chapter: API
layout: slide
tags: ['api']
-categories: ['slidecontent']
---
<http://developer.github.com>
chapter: API
layout: slide
tags: ['api']
-categories: ['slidecontent']
---
You can even just HTTP GET an API URL in a web browser.
chapter: API
layout: slide
tags: ['api']
-categories: ['slidecontent']
---
You can _GET_ data about a user with a simple `curl` call.
heading: false
layout: slide
tags: ['goodbye']
-categories: ['slidecontent']
---
### Training Courses & Free Classes
cover: false
layout: slide
tags: ['trainers/brent-beer']
-categories: ['slidecontent']
---
<img class="headshot" src="assets/headshots/beer-brent.jpg" alt="Brent Beer">
cover: false
layout: slide
tags: ['trainers/jordan-mccullough']
-categories: ['slidecontent']
---
<img class="headshot" src="assets/headshots/mccullough-jordan.jpg" alt="Jordan McCullough">
cover: false
layout: slide
tags: ['trainers/matthew-mccullough']
-categories: ['slidecontent']
---
<img class="headshot" src="assets/headshots/mccullough-matthew.jpg" alt="Matthew McCullough">
cover: false
layout: slide
tags: ['trainers/tim-berglund']
-categories: ['slidecontent']
---
<img class="headshot" src="assets/headshots/berglund-tim.jpg" alt="Tim Berglund">
chapter: Branch
layout: slide
tags: ['education/branch']
-categories: ['slidecontent']
---
* Branches are _cheap_
chapter: Branch
layout: slide
tags: ['education/branch']
-categories: ['slidecontent']
---
#List (Local) Branches
chapter: Branch
layout: slide
tags: ['education/branch']
-categories: ['slidecontent']
---
# Create a branch and then switch to it
chapter: Branch
layout: slide
tags: ['education/branch']
-categories: ['slidecontent']
---
# Delete if branch is merged with upstream
chapter: Setup
layout: slide
tags: ['education/setup']
-categories: ['slidecontent']
---
Check your version (if it is already installed)
heading: false
layout: slide
tags: ['education/setup']
-categories: ['slidecontent']
---
<div class="sticky">
chapter: Alias
layout: slide
tags: ['alias']
-categories: ['slidecontent']
---
Command shortcuts
chapter: Branch
layout: slide
tags: ['branch']
-categories: ['slidecontent']
---
* Branches are _cheap_
chapter: Branch
layout: slide
tags: ['branch']
-categories: ['slidecontent']
---
#List (Local) Branches
chapter: Branch
layout: slide
tags: ['branch']
-categories: ['slidecontent']
---
git branch <branchname> <ref>
chapter: Branch
layout: slide
tags: ['branch']
-categories: ['slidecontent']
---
# Delete if branch is merged with upstream
chapter: Branch
layout: slide
tags: ['branch']
-categories: ['slidecontent']
---
# Change branch name
chapter: GUIs
layout: slide
tags: ['gui']
-categories: ['slidecontent']
---
# Committing
chapter: GUIs
layout: slide
tags: ['gui']
-categories: ['slidecontent']
---
__GitHub for Windows__
chapter: "Git's Origin"
layout: slide
tags: ['history']
-categories: ['slidecontent']
---
chapter: 'Git History'
layout: slide
tags: ['history']
-categories: ['slidecontent']
---
Git tracks __content__
\ No newline at end of file
chapter: Ignore
layout: slide
tags: ['ignore']
-categories: ['slidecontent']
---
* Create a `.gitignore` file
chapter: Ignore
layout: slide
tags: ['ignore']
-categories: ['slidecontent']
---
# Anything ending ".log"
chapter: Ignore
layout: slide
tags: ['ignore']
-categories: ['slidecontent']
---
* Nest .gitignore file for granular control
chapter: Ignore
layout: slide
tags: ['ignore']
-categories: ['slidecontent']
---
Avoid committing undesired environment files
chapter: Ignore
layout: slide
tags: ['ignore']
-categories: ['slidecontent']
---
$ git config --global core.excludesfile "~/.gitignore"
chapter: Init
layout: slide
tags: ['init']
-categories: ['slidecontent']
---
# New project
chapter: Init
layout: slide
tags: ['init']
-categories: ['slidecontent']
---
# Legacy project tree
chapter: Merge
layout: slide
tags: ['merge']
-categories: ['slidecontent']
---
git checkout master
chapter: Merge
layout: slide
tags: ['merge','diagram']
-categories: ['slidecontent']
---
<div class="diagram-group">
chapter: Merge
layout: slide
tags: ['merge','diagram']
-categories: ['slidecontent']
---
<div class="diagram-group">
chapter: Merge
layout: slide
tags: ['merge']
-categories: ['slidecontent']
---
git add <conflicting-file>
git commit -m"<commit-message>"
\ No newline at end of file
chapter: Merge
layout: slide
tags: ['merge']
-categories: ['slidecontent']
---
git checkout --ours <file>
chapter: Network
layout: slide
tags: ['network','diagram']
-categories: ['slidecontent']
---
<div class="diagram-group">
chapter: Network
layout: slide
tags: ['network']
-categories: ['slidecontent']
---
git remote add <name> <url>
chapter: Network
layout: slide
tags: ['network']
-categories: ['slidecontent']
---
<div class="sticky">
chapter: Network
layout: slide
tags: ['network']
-categories: ['slidecontent']
---
#List remote branches
chapter: Network
layout: slide
tags: ['network']
-categories: ['slidecontent']
---
git push <remote> <branch>
chapter: Network
layout: slide
tags: ['network']
-categories: ['slidecontent']
---
git pull <remote> <branch>
chapter: Rebase
layout: slide
tags: ['rebase']
-categories: ['slidecontent']
---
* Preparing for a merge
chapter: Rebase
layout: slide
tags: ['rebase','diagram']
-categories: ['slidecontent']
---
<div class="diagram-group">
chapter: Rebase
layout: slide
tags: ['rebase']
-categories: ['slidecontent']
---
git checkout <feature-branch>
chapter: Rebase
layout: slide
tags: ['rebase','diagram']
-categories: ['slidecontent']
---
chapter: Rebase
layout: slide
tags: ['rebase']
-categories: ['slidecontent']
---
git rebase -i <ref>
\ No newline at end of file
chapter: Reflog
layout: slide
tags: ['reflog']
-categories: ['slidecontent']
---
git reflog -<n>
chapter: Reflog
layout: slide
tags: ['reflog']
-categories: ['slidecontent']
---
<iframe width="560" height="315" src="https://www.youtube-nocookie.com/embed/LIxxxMEoMMo?rel=0" frameborder="0" allowfullscreen></iframe>
chapter: Reset
layout: slide
tags: ['reset']
-categories: ['slidecontent']
---
chapter: Reset
layout: slide
tags: ['reset']
-categories: ['slidecontent']
---
heading: false
layout: slide
tags: ['reset']
-categories: ['slidecontent']
---
<div class="sticky">
chapter: Revert
layout: slide
tags: ['revert']
-categories: ['slidecontent']
---
Restore past patch set via new commit
chapter: Remove & Move
layout: slide
tags: ['rm-mv','diagram']
-categories: ['slidecontent']
---
<div class="diagram-group">
chapter: Remove & Move
layout: slide
tags: ['rm-mv','diagram']
-categories: ['slidecontent']
---
<div class="diagram-group">
chapter: Remove & Move
layout: slide
tags: ['rm-mv']
-categories: ['slidecontent']
---
# Directly remove & stage
chapter: Remove & Move
layout: slide
tags: ['rm-mv']
-categories: ['slidecontent']
---
# Stop file tracking
chapter: Remove & Move
layout: slide
tags: ['rm-mv']
-categories: ['slidecontent']
---
$ git mv <FILENAME> <NEWFILENAME>
chapter: Remove & Move
layout: slide
tags: ['rm-mv']
-categories: ['slidecontent']
---
# Renames shown
heading: false
layout: slide
tags: ['setup']
-categories: ['slidecontent']
---
<div class="sticky">
heading: false
layout: slide
tags: ['setup']
-categories: ['slidecontent']
---
<div class="sticky">
chapter: Setup
layout: slide
tags: ['setup']
-categories: ['slidecontent']
---
Test the Install. Check your Version
chapter: Stash
layout: slide
tags: ['stash']
-categories: ['slidecontent']
---
super quick branch that's local-only
heading: false
layout: slide
tags: ['stash']
-categories: ['slidecontent']
---
# Stash your pending changes
heading: false
layout: slide
tags: ['stash']
-categories: ['slidecontent']
---
# Merge & delete the latest stash
heading: false
layout: slide
tags: ['stash']
-categories: ['slidecontent']
---
# Diff stashed patches
chapter: Stash
layout: slide
tags: ['stash']
-categories: ['slidecontent']
---
$ git branch <branchname> <stash-name>
\ No newline at end of file
heading: false
layout: slide
tags: ['tag']
-categories: ['slidecontent']
---
# Annotated Tag with HEAD
chapter: Tag
layout: slide
tags: ['tag']
-categories: ['slidecontent']
---
git tag -a <TAGNAME>
chapter: Tag
layout: slide
tags: ['tag']
-categories: ['slidecontent']
---
# Push specific tag
chapter: Tree-ish
layout: slide
tags: ['treeish']
-categories: ['slidecontent']
---
40 character hashes are hard to remember:
layout: hydeside
tags:
- "pages/getting-started"
-categories: ['slidecontent']
---
From the GitHub site's top navigation bar, [create a new repository](https://github.com/new) owned by your personal account.
layout: hydeside
tags:
- "pages/getting-started"
-categories: ['slidecontent']
---
Follow the on-page instructions to clone the repository locally to your computer:
layout: hydeside
tags:
- "pages/getting-started"
-categories: ['slidecontent']
---
* Create an `index.html` file.
layout: hydeside
tags:
- "pages/getting-started"
-categories: ['slidecontent']
---
- Tell Git to add the file to the staging area.
layout: hydeside
tags:
- "pages/getting-started"
-categories: ['slidecontent']
---
Push the changes to GitHub.
layout: hydeside
tags:
- "pages/getting-started"
-categories: ['slidecontent']
---
1. Navigate to <br /> <span style="font-size: 0.9em;"">`http://[username].github.io/simple-site`</span>
layout: hydeside
tags:
- "pages/getting-started"
-categories: ['slidecontent']
---
<div class="sticky">
layout: hydeside
tags:
- "pages/getting-started"
-categories: ['slidecontent']
---
* The index file we created is just an HTML file. We can add any HTML we wish.
layout: hydeside
tags:
- "pages/jekyll"
-categories: ['slidecontent']
---
* In addition to static file hosting, special files are transparently run through a powerful yet simple templating engine named [Jekyll](https://github.com/mojombo/jekyll) after every push to GitHub.
layout: hydeside
tags:
- "pages/jekyll"
-categories: ['slidecontent']
heading: false
---
title: GitHub Pages Serving
tags:
- "pages/jekyll"
-categories: ['slidecontent']
---
* Any file in the `gh-pages` branch of your repository will be transparently served via GitHub Pages including CSS, HTML, JPEGs, and JavaScript.
layout: hydeside
tags:
- "pages/jekyll"
-categories: ['slidecontent']
---
All files with _front matter_ are run through Jekyll by default.
title: YAML
tags:
- "pages/jekyll"
-categories: ['slidecontent']
---
* Jekyll uses a simple format called [YAML](http://www.yaml.org/) to communicate page properties
layout: hydeside
tags:
- "pages/jekyll"
-categories: ['slidecontent']
---
At its most basic level, YAML is simply a set of properties and values separated by a colon (`:`). For example:
title: YAML Behavior
tags:
- "pages/jekyll"
-categories: ['slidecontent']
---
* Any text-based file, regardless of the filetype, can be supplemented with YML front matter.
layout: hydeside
tags:
- "pages/layouts"
-categories: ['slidecontent']
---
* Jekyll's most powerful (and simplest) feature is called "layouts"
layout: hydeside
tags:
- "pages/layouts"
-categories: ['slidecontent']
---
* Let's say we pull the HTML out of `index.html` and save it to `_layouts/page.html` so that it looks like this:
layout: hydeside
tags:
- "pages/layouts"
-categories: ['slidecontent']
---
We need to tell Jekyll to use our spiffy new layout. Let's add the following to the top of `index.html`:
layout: hydeside
tags:
- "pages/layouts"
-categories: ['slidecontent']
---
* When we push our template to to GitHub pages Jekyll will replace <code>{{ content }}</code> with the actual content, so lets...
layout: hydesides
tags:
- "pages/moar-jekyll"
-categories: ['slidecontent']
---
* Includes allow you to reuse common elements
layout: hydesides
tags:
- "pages/moar-jekyll"
-categories: ['slidecontent']
---
* Experiment with pretty [permalinks](https://github.com/mojombo/jekyll/wiki/Permalinks) (hint: `permalink` in a page's YML front matter will manually define its permalink)
layout: hydesides
tags:
- "pages/template-data"
-categories: ['slidecontent']
---
* In addition to layouts, Jekyll also provides some more advanced template features
layout: hydesides
tags:
- "pages/template-data"
-categories: ['slidecontent']
---
* Let's update the YML frontmatter on our `index.html` file to include:
layout: hydesides
tags:
- "pages/template-data"
-categories: ['slidecontent']
---
Now, we can go back to update our page layout in `_layouts/page.html` to add a page title like so:
title: Let's Take A Look Part Deux
tags:
- "pages/template-data"
-categories: ['slidecontent']
---
* Let's commit and push our changes: