Slide 1

Slide 1 text

git or: how I learned to stop worrying and love source control

Slide 2

Slide 2 text

why you should care

Slide 3

Slide 3 text

Traditional version control systems have deficiencies

Slide 4

Slide 4 text

Subversion, Perforce, CVS, TFS...

Slide 5

Slide 5 text

OH, THE PAIN! SLOW TREE CONFLICTS MERGING IS CHALLENGING BRANCHES ARE JUST COPIES

Slide 6

Slide 6 text

using svn

Slide 7

Slide 7 text

using git

Slide 8

Slide 8 text

is awesome git

Slide 9

Slide 9 text

It’s distributed! Distributed Version Control System

Slide 10

Slide 10 text

Every repository is equal.

Slide 11

Slide 11 text

You can work offline.

Slide 12

Slide 12 text

Fast as lightning.

Slide 13

Slide 13 text

add status diff log commit branch git mercurial bazaar

Slide 14

Slide 14 text

Very efficient. git clone rails - 53 seconds 40mb, 2356 files, 29045 commits

Slide 15

Slide 15 text

Great branching and merging.

Slide 16

Slide 16 text

Any workflow you want, you got it...

Slide 17

Slide 17 text

Shared repository

Slide 18

Slide 18 text

Blessed repository Linus Torvalds Lieutenants Developers

Slide 19

Slide 19 text

everyone uses git

Slide 20

Slide 20 text

14% 29% 55% GitHub SourceForge Google Code CodePlex Total number of commits 2011.01 - 2011.05

Slide 21

Slide 21 text

automapper backbone bootstrap cassandra coffeescript couchdb cucumber fluent-nhibernate git jekyll less linux modernizr mongodb mono nancy ninject node nservicebus rails ravendb reddit

Slide 22

Slide 22 text

how toinstall

Slide 23

Slide 23 text

Linux: apt-get install git-core Mac OS X: brew install git Windows: chocolatey install msysgit

Slide 24

Slide 24 text

getting started

Slide 25

Slide 25 text

git config --global user.name ... git config --global user.email ...

Slide 26

Slide 26 text

git init

Slide 27

Slide 27 text

master has no special meaning. It’s just a default branch.

Slide 28

Slide 28 text

git add --all

Slide 29

Slide 29 text

git commit

Slide 30

Slide 30 text

189f30b664981e4397625791c8ea3bbb5f2279a3 Commit “name” is a 40-digit SHA

Slide 31

Slide 31 text

There are four types of objects: tag, commit, tree and blob.

Slide 32

Slide 32 text

git remote add origin git@git...

Slide 33

Slide 33 text

git push origin master

Slide 34

Slide 34 text

HEAD is a reference to the last commit in the current branch.

Slide 35

Slide 35 text

git pull origin master

Slide 36

Slide 36 text

Basic training complete.

Slide 37

Slide 37 text

and history branching

Slide 38

Slide 38 text

git branch name

Slide 39

Slide 39 text

Branch is a reference to the head of a line of work.

Slide 40

Slide 40 text

git checkout name

Slide 41

Slide 41 text

git merge name

Slide 42

Slide 42 text

git reset --hard commit

Slide 43

Slide 43 text

git rebase name

Slide 44

Slide 44 text

merge is fine, but in a lot of cases, rebase is better.

Slide 45

Slide 45 text

git commit --amend

Slide 46

Slide 46 text

git rebase --interactive

Slide 47

Slide 47 text

Interactive rebase lets you: reword, edit, squash, fixup, exec, remove and reorder.

Slide 48

Slide 48 text

You can change history of remote repository with git push --force. Be careful!

Slide 49

Slide 49 text

Rewriting history is fun and useful!

Slide 50

Slide 50 text

svn git-

Slide 51

Slide 51 text

git svn clone http://...

Slide 52

Slide 52 text

git svn rebase ~ svn update

Slide 53

Slide 53 text

git svn dcommit ~ svn commit

Slide 54

Slide 54 text

GitHub

Slide 55

Slide 55 text

The best way to collaborate.

Slide 56

Slide 56 text

~1.5 million people, ~2.5 million repositories.

Slide 57

Slide 57 text

Phil Haack, Adam Roben, Paul Betts are GitHubbers

Slide 58

Slide 58 text

github.com/Haacked/SeeGit GitHub for Windows...?

Slide 59

Slide 59 text

thoughts closing

Slide 60

Slide 60 text

blame bisect cherry-pick clean cvsimport describe diff fetch filter-branch grep request-pull revert svnimport stash submodule tag and more...

Slide 61

Slide 61 text

progit.org gitready.com gitimmersion.com ontwik.com/category/git-github RESOURCES

Slide 62

Slide 62 text

https://git.wiki.kernel.org/articles/i/n/t/ Interfaces,_frontends,_and_tools.html TortoiseGit Git Extensions Git Source Control Provider TOOLS

Slide 63

Slide 63 text

Git != Subversion + Magic

Slide 64

Slide 64 text

The slogan of Subversion for a while was "CVS done right". If you start with that kind of slogan, there's nowhere you can go. There is no way to do CVS right. Linus Torvalds

Slide 65

Slide 65 text

Zach Holman @holman thenounproject.com thanks to:

Slide 66

Slide 66 text

twitter.com/mmozuras github.com/mmozuras thanks!