Social Coding

with Git & Github



Andrew Turner - @ajturner

slides: heorb.it/socialcoding

Level 1: Getting Started

Git

25edcfe3312d7f7a307427265845e53a6b3fda10

Distributed version control

git clone git@github.com:Esri/presentations.git

Simple branching


git branch ajturner-feature
git checkout -b ajturner-feature
git commit -am 'Added some new slides'
git checkout master

What is Github?

  • Hosted Git
  • Social Network for Code

Level 2: Working in Git

init add commit pull push

Your first Repo

git init
git add Readme.md
git commit -am 'Initial Commit'

Working through Github


Create or Fork a Project


git clone git@github.com:ajturner/project.git
git commit -am 'Fixed issue with bad Titles #345'
git push ajturner master

Level 3: Better Collaboration

checkout merge

Branching


git checkout -b ajturner-newfeature
git commit -am 'Added feature #582'
git push ajturner ajturner-newfeature
git checkout master
git merge ajturner-newfeature

Pushing Back


git remote add upstream git@github.com:Esri/project.git
git push upstream master

Level 4: Master

pull-request rebase

Contributing with Pull-Request

git pull-request -b esri:master -h ajturner:master

Keeping a Clean History

git checkout ajturner-newfeature
git rebase upstream master

Ephiphany: Going Social

Pull-Requests & Code Reviews

Gists

Level 0: Tools of the Trade

Gooey Clients

windows.github.com

Gooey Clients

mac.github.com

Gooey Clients

sourcetreeapp.com

Gists

...still git

bl.ocks.org

Github Wiki

(Markdown)[http://whatismarkdown.com/]

...still git

gh-pages

git checkout -b gh-pages
git push ajturner gh-pages

Huboard

Jump in!

session: 1401