Slide 1

Slide 1 text

Working with Git and GitHub. Work better, together.

Slide 2

Slide 2 text

My name is Matt Yoho. I write code at GitHub. @mattyoho

Slide 3

Slide 3 text

Git Distributed version control.

Slide 4

Slide 4 text

GitHub Social coding. Open source.

Slide 5

Slide 5 text

GitHub Creative project collaboration.

Slide 6

Slide 6 text

No content

Slide 7

Slide 7 text

? ? ?

Slide 8

Slide 8 text

So, what is version control?

Slide 9

Slide 9 text

So, what is version control? And why do I care?

Slide 10

Slide 10 text

Let’s look at a daily workflow.

Slide 11

Slide 11 text

1. Create some files. 2. Save some files. 3. Edit some files. 4. Save them again.

Slide 12

Slide 12 text

1. Create some files. 2. Save some files. 3. Edit some files. 4. Save them again.

Slide 13

Slide 13 text

1. Create some files. 2. Save some files. 3. Edit some files. 4. Save them again.

Slide 14

Slide 14 text

1. Create some files. 2. Save some files. 3. Edit some files. 4. Save them again.

Slide 15

Slide 15 text

1. Create some files. 2. Save some files. 3. Edit some files. 4. Save them again.

Slide 16

Slide 16 text

Where was I again?!

Slide 17

Slide 17 text

Alternatively...

Slide 18

Slide 18 text

Experimentation

Slide 19

Slide 19 text

X Experimentation

Slide 20

Slide 20 text

X Experimentation

Slide 21

Slide 21 text

X ? Experimentation

Slide 22

Slide 22 text

Repos and commits

Slide 23

Slide 23 text

Commits Commits capture the contents of a project’s files at a point in time. A repository contains all the commits for a project, and some other metadata.

Slide 24

Slide 24 text

Commits Commits capture the contents of a project’s files at a point in time. A repository contains all the commits for a project, and some other metadata. A commit is like a savepoint.

Slide 25

Slide 25 text

Stages of a file staged committed changed git add git commit edit

Slide 26

Slide 26 text

Creating a repo

Slide 27

Slide 27 text

$> mkdir ./my_project $> cd my_project $> git init . $> gitting started

Slide 28

Slide 28 text

$> git init . $> git add [--all] $> git mv $> git commit [--amend] $> add commands

Slide 29

Slide 29 text

$> git status $> git show $> git diff $> git log $> status commands

Slide 30

Slide 30 text

Undoing things

Slide 31

Slide 31 text

$> git add -u $> git rm $> git reset $> git revert $> undo commands

Slide 32

Slide 32 text

Branches

Slide 33

Slide 33 text

Master (branch) (m erge) Feature

Slide 34

Slide 34 text

Branching and merging

Slide 35

Slide 35 text

$> git branch $> git checkout [--branch] $> git merge $> branch commands

Slide 36

Slide 36 text

The .git directory .git 6effec72 813a7a9c 071ae029

Slide 37

Slide 37 text

So, what’s the deal with GitHub?

Slide 38

Slide 38 text

So, what’s the point of GitHub? Octocloud

Slide 39

Slide 39 text

Working with remotes

Slide 40

Slide 40 text

$> git remote $> git push $> git fetch $> git pull $> remote commands

Slide 41

Slide 41 text

Git through the web UI

Slide 42

Slide 42 text

That’s neat and all, but what about the collaboration stuff?

Slide 43

Slide 43 text

Forking

Slide 44

Slide 44 text

Pull Requests

Slide 45

Slide 45 text

Pull Requests 

Slide 46

Slide 46 text

Forks, issues, and PRs

Slide 47

Slide 47 text

Master O pen P R M erge P R Feature

Slide 48

Slide 48 text

Master merge commit Log view

Slide 49

Slide 49 text

Git tricks

Slide 50

Slide 50 text

Rebasing commits

Slide 51

Slide 51 text

GHforM GHforW

Slide 52

Slide 52 text

Further Learning

Slide 53

Slide 53 text

No content

Slide 54

Slide 54 text

No content

Slide 55

Slide 55 text

No content

Slide 56

Slide 56 text

Thank you. http://git-scm.com/ http://mac.github.com/ http://windows.github.com/ http://training.github.com/ http://help.github.com/

Slide 57

Slide 57 text

Thank you. Questions? http://git-scm.com/ http://mac.github.com/ http://windows.github.com/ http://training.github.com/ http://help.github.com/