getting git

523
Getting Git Scott Chacon

Upload: scott-chacon

Post on 22-Apr-2015

54.703 views

Category:

Spiritual


1 download

DESCRIPTION

Understanding and using the Git source control system.

TRANSCRIPT

Page 1: Getting Git

Getting GitScott Chacon

Page 2: Getting Git

2m Who is Scott?

What is Git?

How Does Git Work?

How Do I Use Git?

2m This Slide

3m

20m

12m

How Do I Deploy with Git?4m

Where Can I Learn More?2m

75%

35 min

15%

6 min

10%

4 min

Page 3: Getting Git

2m Who is Scott?

What is Git?

How Does Git Work?

How Do I Use Git?

2m This Slide

3m

20m

12m

How Do I Deploy with Git?4m

Where Can I Learn More?2m

75%

35 min

15%

6 min

10%

4 min

2m This Slide10%

4 min

Page 4: Getting Git

2m Who is Scott?

What is Git?

How Does Git Work?

How Do I Use Git?

2m This Slide

3m

20m

12m

How Do I Deploy with Git?4m

Where Can I Learn More?2m

75%

35 min

15%

6 min

10%

4 min2m Who is Scott?

10%

4 min

Page 5: Getting Git

2m Who is Scott?

What is Git?

How Does Git Work?

How Do I Use Git?

2m This Slide

3m

20m

12m

How Do I Deploy with Git?4m

Where Can I Learn More?2m

75%

35 min

15%

6 min

10%

4 min

75%

35 min

3m What is Git?

Page 6: Getting Git

2m Who is Scott?

What is Git?

How Does Git Work?

How Do I Use Git?

2m This Slide

3m

20m

12m

How Do I Deploy with Git?4m

Where Can I Learn More?2m

75%

35 min

15%

6 min

10%

4 min

75%

35 min

20m How Does Git Work?

Page 7: Getting Git

2m Who is Scott?

What is Git?

How Does Git Work?

How Do I Use Git?

2m This Slide

3m

20m

12m

How Do I Deploy with Git?4m

Where Can I Learn More?2m

75%

35 min

15%

6 min

10%

4 min

75%

35 min

12m How Do I Use Git?

Page 8: Getting Git

2m Who is Scott?

What is Git?

How Does Git Work?

How Do I Use Git?

2m This Slide

3m

20m

12m

How Do I Deploy with Git?4m

Where Can I Learn More?2m

75%

35 min

15%

6 min

10%

4 min

4m How Do I Deploy with Git?15%

6 min

Page 9: Getting Git

2m Who is Scott?

What is Git?

How Does Git Work?

How Do I Use Git?

2m This Slide

3m

20m

12m

How Do I Deploy with Git?4m

Where Can I Learn More?2m

75%

35 min

15%

6 min

10%

4 min

2m Where Can I Learn More?

15%

6 min

Page 10: Getting Git

Who Is Scott?Introducing myself...

Page 11: Getting Git

2m Who is Scott?

What is Git?

How Does Git Work?

How Do I Use Git?

2m This Slide

3m

20m

12m

How Do I Deploy with Git?4m

Where Can I Learn More?2m

75%

35 min

15%

6 min

10%

4 min2m Who is Scott?

10%

4 min

Page 12: Getting Git

Scott Anthony Chacon

Page 13: Getting Git

github.com/schacon

Page 14: Getting Git
Page 15: Getting Git

www.gitcasts.com

Page 16: Getting Git
Page 17: Getting Git

RailsGitXen3D CamerasHuge Flat Screensjepoirrier@flickr

Page 18: Getting Git
Page 19: Getting Git

me

Page 20: Getting Git

introduce yourself

Page 21: Getting Git

introduce yourselfand your sweet projects...

Page 22: Getting Git

why is scott here?

Page 23: Getting Git

What is Git?

Page 24: Getting Git

2m Who is Scott?

What is Git?

How Does Git Work?

How Do I Use Git?

2m This Slide

3m

20m

12m

How Do I Deploy with Git?4m

Where Can I Learn More?2m

75%

35 min

15%

6 min

10%

4 min

75%

35 min

3m What is Git?

Page 25: Getting Git

git is

Page 26: Getting Git

directory contentmanagement system

git is

Page 27: Getting Git

tree history storage system

git is

Page 28: Getting Git

stupid content tracker

git is

Page 29: Getting Git

a toolkit

git is

Page 30: Getting Git
Page 31: Getting Git
Page 32: Getting Git

the “plumbing”

Page 33: Getting Git
Page 34: Getting Git
Page 35: Getting Git

the “porcelain”

Page 36: Getting Git
Page 37: Getting Git

not subversion!

git is

Page 38: Getting Git

forget subversion!

Page 39: Getting Git

not an evolution

Page 40: Getting Git

svnrcs cvs git

not an evolution

Page 41: Getting Git

svnrcs cvs git

not an evolution

Page 42: Getting Git

svnrcs cvs git

not an evolution

Page 43: Getting Git

source control taxonomy

Page 44: Getting Git

source control taxonomy

deltastorage

file A !1

file B

file C

C1 C2 C3 C4 C5

!2

!1 !2

!1 !2 !3

A

B

C

C1 C2 C3 C4 C5

A1

B

C1

A1

B

C2

A2

B1

C2

A2

B2

C3

DAGstorage

Page 45: Getting Git

source control taxonomy

deltastorage

file A !1

file B

file C

C1 C2 C3 C4 C5

!2

!1 !2

!1 !2 !3

A

B

C

C1 C2 C3 C4 C5

A1

B

C1

A1

B

C2

A2

B1

C2

A2

B2

C3

DAGstorage

Page 46: Getting Git

source control taxonomy

deltastorage

file A !1

file B

file C

C1 C2 C3 C4 C5

!2

!1 !2

!1 !2 !3

A

B

C

C1 C2 C3 C4 C5

A1

B

C1

A1

B

C2

A2

B1

C2

A2

B2

C3

DAGstorage

Page 47: Getting Git

source control taxonomy

deltastorage

file A !1

file B

file C

C1 C2 C3 C4 C5

!2

!1 !2

!1 !2 !3

A

B

C

C1 C2 C3 C4 C5

A1

B

C1

A1

B

C2

A2

B1

C2

A2

B2

C3

DAGstorage

Page 48: Getting Git

source control taxonomy

deltastorage

file A !1

file B

file C

C1 C2 C3 C4 C5

!2

!1 !2

!1 !2 !3

A

B

C

C1 C2 C3 C4 C5

A1

B

C1

A1

B

C2

A2

B1

C2

A2

B2

C3

DAGstorage

Page 49: Getting Git

source control taxonomy

deltastorage

file A !1

file B

file C

C1 C2 C3 C4 C5

!2

!1 !2

!1 !2 !3

A

B

C

C1 C2 C3 C4 C5

A1

B

C1

A1

B

C2

A2

B1

C2

A2

B2

C3

DAGstorage

Page 50: Getting Git

source control taxonomy

deltastorage

file A !1

file B

file C

C1 C2 C3 C4 C5

!2

!1 !2

!1 !2 !3

A

B

C

C1 C2 C3 C4 C5

A1

B

C1

A1

B

C2

A2

B1

C2

A2

B2

C3

DAGstorage

Page 51: Getting Git

source control taxonomy

deltastorage

file A !1

file B

file C

C1 C2 C3 C4 C5

!2

!1 !2

!1 !2 !3

A

B

C

C1 C2 C3 C4 C5

A1

B

C1

A1

B

C2

A2

B1

C2

A2

B2

C3

DAGstorage

Page 52: Getting Git

source control taxonomy

deltastorage

file A !1

file B

file C

C1 C2 C3 C4 C5

!2

!1 !2

!1 !2 !3

A

B

C

C1 C2 C3 C4 C5

A1

B

C1

A1

B

C2

A2

B1

C2

A2

B2

C3

DAGstorage

Page 53: Getting Git

source control taxonomy

deltastorage

file A !1

file B

file C

C1 C2 C3 C4 C5

!2

!1 !2

!1 !2 !3

A

B

C

C1 C2 C3 C4 C5

A1

B

C1

A1

B

C2

A2

B1

C2

A2

B2

C3

DAGstorage

Page 54: Getting Git

source control taxonomy

deltastorage

file A !1

file B

file C

C1 C2 C3 C4 C5

!2

!1 !2

!1 !2 !3

A

B

C

C1 C2 C3 C4 C5

A1

B

C1

A1

B

C2

A2

B1

C2

A2

B2

C3

DAGstorage

Page 55: Getting Git

source control taxonomy

deltastorage

file A !1

file B

file C

C1 C2 C3 C4 C5

!2

!1 !2

!1 !2 !3

A

B

C

C1 C2 C3 C4 C5

A1

B

C1

A1

B

C2

A2

B1

C2

A2

B2

C3

DAGstorage

Page 56: Getting Git

source control taxonomy

deltastorage

file A !1

file B

file C

C1 C2 C3 C4 C5

!2

!1 !2

!1 !2 !3

A

B

C

C1 C2 C3 C4 C5

A1

B

C1

A1

B

C2

A2

B1

C2

A2

B2

C3

DAGstorage

Page 57: Getting Git

source control taxonomy

deltastorage

file A !1

file B

file C

C1 C2 C3 C4 C5

!2

!1 !2

!1 !2 !3

A

B

C

C1 C2 C3 C4 C5

A1

B

C1

A1

B

C2

A2

B1

C2

A2

B2

C3

DAGstorage

Page 58: Getting Git

source control taxonomy

deltastorage

file A !1

file B

file C

C1 C2 C3 C4 C5

!2

!1 !2

!1 !2 !3

A

B

C

C1 C2 C3 C4 C5

A1

B

C1

A1

B

C2

A2

B1

C2

A2

B2

C3

DAGstorage

Page 59: Getting Git

svncvs

git

perforce

mercurial

time machinecp -r

rcs

source control taxonomy

darcs

deltastorage

DAGstorage

bazzar

bitkeeper

local

centralized

distributed

local

centralized

distributed

source control taxonomy

Page 60: Getting Git

svncvs

git

perforce

mercurial

time machinecp -r

rcs

source control taxonomy

darcs

deltastorage

DAGstorage

bazzar

bitkeeper

local

centralized

distributed

local

centralized

distributed

source control taxonomy

Page 61: Getting Git

svncvs

git

perforce

mercurial

time machinecp -r

rcs

source control taxonomy

darcs

deltastorage

DAGstorage

bazzar

bitkeeper

local

centralized

distributed

local

centralized

distributed

source control taxonomy

Page 62: Getting Git

svncvs

git

perforce

mercurial

time machinecp -r

rcs

source control taxonomy

darcs

deltastorage

DAGstorage

bazzar

bitkeeper

local

centralized

distributed

local

centralized

distributed

source control taxonomy

Page 63: Getting Git

svncvs

git

perforce

mercurial

time machinecp -r

rcs

source control taxonomy

darcs

deltastorage

DAGstorage

bazzar

bitkeeper

local

centralized

distributed

local

centralized

distributed

source control taxonomy

Page 64: Getting Git

svncvs

git

perforce

mercurial

time machinecp -r

rcs

source control taxonomy

darcs

deltastorage

DAGstorage

bazzar

bitkeeper

local

centralized

distributed

local

centralized

distributed

source control taxonomy

Page 65: Getting Git

svncvs

git

perforce

mercurial

time machinecp -r

rcs

source control taxonomy

darcs

deltastorage

DAGstorage

bazzar

bitkeeper

local

centralized

distributed

local

centralized

distributed

source control taxonomy

Page 66: Getting Git

svncvs

git

perforce

mercurial

time machinecp -r

rcs

source control taxonomy

darcs

deltastorage

DAGstorage

bazzar

bitkeeper

local

centralized

distributed

local

centralized

distributed

source control taxonomy

Page 67: Getting Git

svncvs

git

perforce

mercurial

time machinecp -r

rcs

source control taxonomy

darcs

deltastorage

DAGstorage

bazzar

bitkeeper

local

centralized

distributed

local

centralized

distributed

source control taxonomy

bazaar

Page 68: Getting Git

How Does Git Work?

Page 69: Getting Git

How Does Git Work?

?

Page 70: Getting Git

2m Who is Scott?

What is Git?

How Does Git Work?

How Do I Use Git?

2m This Slide

3m

20m

12m

How Do I Deploy with Git?4m

Where Can I Learn More?2m

75%

35 min

15%

6 min

10%

4 min

75%

35 min

20m How Does Git Work?

Page 71: Getting Git

git

Page 72: Getting Git

git directory

Page 73: Getting Git

git directory

.git

Page 74: Getting Git

git directory

.git

GIT_DIR

Page 75: Getting Git

Git Directoryconfig file

hooks

index

object database

references

Page 76: Getting Git

object database

Page 77: Getting Git

object databasecontent

Page 78: Getting Git

object database

new_content = type + ’ ‘ + content.size + \0 + content

content

Page 79: Getting Git

object database

new_content = type + ’ ‘ + content.size + \0 + content

content “header”

Page 80: Getting Git

object database

new_content = type + ’ ‘ + content.size + \0 + content

sha = Digest::SHA1.hexdigest(new_content)

content

Page 81: Getting Git

object database

new_content = type + ’ ‘ + content.size + \0 + content

sha = Digest::SHA1.hexdigest(new_content)

content

“824aed035c0aa75d64c...”

Page 82: Getting Git

object database

new_content = type + ’ ‘ + content.size + \0 + content

compressed = zlib::deflate(new_content)

sha = Digest::SHA1.hexdigest(new_content)

content

“824aed035c0aa75d64c...”

Page 83: Getting Git

object database

new_content = type + ’ ‘ + content.size + \0 + content

compressed = zlib::deflate(new_content)

sha = Digest::SHA1.hexdigest(new_content)

content

“824aed035c0aa75d64c...”

path = “.git/objects/82/4aed035c0aa75d64c...”

Page 84: Getting Git

object database

new_content = type + ’ ‘ + content.size + \0 + content

compressed = zlib::deflate(new_content)

sha = Digest::SHA1.hexdigest(new_content)

content

“824aed035c0aa75d64c...”

path = “.git/objects/82/4aed035c0aa75d64c...”

File.open(path, ‘w’) {|f| f.write(compressed)}

Page 85: Getting Git

object database

new_content = type + ’ ‘ + content.size + \0 + content

compressed = zlib::deflate(new_content)

sha = Digest::SHA1.hexdigest(new_content)

content

“824aed035c0aa75d64c...”

path = “.git/objects/82/4aed035c0aa75d64c...”

File.open(path, ‘w’) {|f| f.write(compressed)}

“loose” format

Page 86: Getting Git

object databasegit gc

Page 87: Getting Git

object databasegit gc

same file with minor differences

Page 88: Getting Git

object database

.git/objects/f1/032eed02413a1145c...

git gc

.git/objects/45/b983be36b73c0788d...

.git/objects/04/fb8aee105e6e445e8...

.git/objects/63/874f37013c1740acd...

.git/objects/1d/c9cbcb76cbb80fce1...

.git/objects/82/4aed035c0aa75d64c...

same file with minor differences

Page 89: Getting Git

object database

.git/objects/f1/032eed02413a1145c...

git gc

.git/objects/45/b983be36b73c0788d...

.git/objects/04/fb8aee105e6e445e8...

.git/objects/63/874f37013c1740acd...

.git/objects/1d/c9cbcb76cbb80fce1...

.git/objects/82/4aed035c0aa75d64c...

.git/objects/pack/pack-999727..9f600.pack

.git/objects/pack/pack-999727..9f600.idx

same file with minor differences

Page 90: Getting Git

object database

.git/objects/f1/032eed02413a1145c...

git gc

.git/objects/45/b983be36b73c0788d...

.git/objects/04/fb8aee105e6e445e8...

.git/objects/63/874f37013c1740acd...

.git/objects/1d/c9cbcb76cbb80fce1...

.git/objects/82/4aed035c0aa75d64c...

.git/objects/pack/pack-999727..9f600.pack

.git/objects/pack/pack-999727..9f600.idx

same file with minor differences

Page 91: Getting Git

object database

.git/objects/f1/032eed02413a1145c...

git gc

.git/objects/45/b983be36b73c0788d...

.git/objects/04/fb8aee105e6e445e8...

.git/objects/63/874f37013c1740acd...

.git/objects/1d/c9cbcb76cbb80fce1...

.git/objects/82/4aed035c0aa75d64c...

.git/objects/pack/pack-999727..9f600.pack

.git/objects/pack/pack-999727..9f600.idx

same file with minor differences

“packed” format

Page 92: Getting Git

object database

all git objects are stored this way

Page 93: Getting Git

object database

new_content = type + ’ ‘ + content.size + \0 + content

4 types of git objects

Page 94: Getting Git

object database

blob

Page 95: Getting Git

object database

blob tree

Page 96: Getting Git

object database

commit

blob tree

Page 97: Getting Git

object database

commit tag

blob tree

Page 98: Getting Git

object database

blob

Page 99: Getting Git

Rakele

README

simplegit.rb

./

lib/

blob : a874b7

blob : a906cb

blob : a0a60a

Working Directory Git Directory

object databaseblob

Page 100: Getting Git

object database{SimpleGit Ruby Library======================

This library calls git commands and returns the output.

Author : Scott Chacon

blob [content size]\0

Zlib::Inflate

blob : a906cb

zlib::deflate

Page 101: Getting Git

object database{SimpleGit Ruby Library======================

This library calls git commands and returns the output.

Author : Scott Chacon

blob [content size]\0

Zlib::Inflate

blob : a906cb

content

zlib::deflate

Page 102: Getting Git

object database{SimpleGit Ruby Library======================

This library calls git commands and returns the output.

Author : Scott Chacon

blob [content size]\0

Zlib::Inflate

blob : a906cb

content

header

zlib::deflate

Page 103: Getting Git

object database{SimpleGit Ruby Library======================

This library calls git commands and returns the output.

Author : Scott Chacon

blob [content size]\0

Zlib::Inflate

blob : a906cb

content

header

compress zlib::deflate

Page 104: Getting Git

object database{SimpleGit Ruby Library======================

This library calls git commands and returns the output.

Author : Scott Chacon

blob [content size]\0

Zlib::Inflate

blob : a906cb

content

header

compress

object

zlib::deflate

Page 105: Getting Git

object database

commit tag

blob tree

Page 106: Getting Git

object database

tree

Page 107: Getting Git

object databasetree

Rakele

README

simplegit.rb

./

lib/

blob : a874b7

blob : a906cb

blob : a0a60a

Working Directory Git Directory

Page 108: Getting Git

object databasetree

Rakele

README

simplegit.rb

./

lib/

tree : 1a738d

tree : fe8971

Working Directory Git Directory

blob : a874b7

blob : a906cb

blob : a0a60a

Page 109: Getting Git

object database{100644 blob a906cb README100644 blob a874b7 Rakefile040000 tree fe8971 lib

tree [content size]\0

tree : 1a738d

Zlib::Inflatezlib::deflate

Page 110: Getting Git

object database{100644 blob a906cb README100644 blob a874b7 Rakefile040000 tree fe8971 lib

tree [content size]\0

tree : 1a738d

Zlib::Inflate

filename“inode” info

zlib::deflate

Page 111: Getting Git

object database{100644 blob a906cb README100644 blob a874b7 Rakefile040000 tree fe8971 lib

tree [content size]\0

tree : 1a738d

Zlib::Inflate

“block pointer”typemode

zlib::deflate

Page 112: Getting Git

object database

commit tag

blob tree

Page 113: Getting Git

object database

commit

Page 114: Getting Git

commit

tree

blob

tree

tree blob

blob

branch

HEAD

object databasecommit

Page 115: Getting Git

object database{Zlib::Inflate

tree e1b3ecparent a11befauthor Scott Chacon <[email protected]> 1205624433committer Scott Chacon <[email protected]> 1205624433

my second commit, which is better than the first

commit [content size]\0

commit : e1b3ec

zlib::deflate

Page 116: Getting Git

object database{Zlib::Inflate

tree e1b3ecparent a11befauthor Scott Chacon <[email protected]> 1205624433committer Scott Chacon <[email protected]> 1205624433

my second commit, which is better than the first

commit [content size]\0

commit : e1b3ec

zlib::deflate

Page 117: Getting Git

object database{Zlib::Inflate

tree e1b3ecparent a11befauthor Scott Chacon <[email protected]> 1205624433committer Scott Chacon <[email protected]> 1205624433

my second commit, which is better than the first

commit [content size]\0

commit : e1b3ec

zlib::deflate

Page 118: Getting Git

object database{Zlib::Inflate

tree e1b3ecparent a11befauthor Scott Chacon <[email protected]> 1205624433committer Scott Chacon <[email protected]> 1205624433

my second commit, which is better than the first

commit [content size]\0

commit : e1b3ec

zlib::deflate

Page 119: Getting Git

object database{Zlib::Inflate

tree e1b3ecparent a11befauthor Scott Chacon <[email protected]> 1205624433committer Scott Chacon <[email protected]> 1205624433

my second commit, which is better than the first

commit [content size]\0

commit : e1b3ec

zlib::deflate

Page 120: Getting Git

blob

branch

HEAD

commit

remote

tree

tag

object database

Page 121: Getting Git

object database

commit tag

blob tree

Page 122: Getting Git

object database

tag

Page 123: Getting Git

blob

branch

HEAD

commit

remote

tree

tag

object databasetag

Page 124: Getting Git

object database{Zlib::Inflate

object 0576fatype committag v0.1tagger Scott Chacon <[email protected]> 1205624655

this is my v0.1 tag

tag [content size]\0

tag : 0c819c

zlib::deflate

Page 125: Getting Git

object database{Zlib::Inflate

object 0576fatype committag v0.1tagger Scott Chacon <[email protected]> 1205624655

this is my v0.1 tag

tag [content size]\0

tag : 0c819c

zlib::deflate

Page 126: Getting Git

object database{Zlib::Inflate

object 0576fatype committag v0.1tagger Scott Chacon <[email protected]> 1205624655

this is my v0.1 tag

tag [content size]\0

tag : 0c819c

zlib::deflate

Page 127: Getting Git

object database{Zlib::Inflate

object 0576fatype committag v0.1tagger Scott Chacon <[email protected]> 1205624655

this is my v0.1 tag

tag [content size]\0

tag : 0c819c

zlib::deflate

Page 128: Getting Git

object database{Zlib::Inflate

object 0576fatype committag v0.1tagger Scott Chacon <[email protected]> 1205624655

this is my v0.1 tag

tag [content size]\0

tag : 0c819c

zlib::deflate

Page 129: Getting Git

object database

commit tag

blob tree

Page 130: Getting Git

object database

commit tag

blob tree

immutable

Page 131: Getting Git

object database

commit tag

blob tree

immutable

can’t be muted

Page 132: Getting Git

Git Directoryconfig file

hooks

index

object database

references

Page 133: Getting Git

references

Page 134: Getting Git

blob

branch

HEAD

commit

remote

tree

tag

referenceslightweight, movablepointers to a commit

Page 135: Getting Git

blob

branch

HEAD

commit

remote

tree

tag

referenceslightweight, movablepointers to a commit

stored in .git/refs/*as simple files

Page 136: Getting Git

blob

branch

HEAD

commit

remote

tree

tag

references

Page 137: Getting Git

the object model

Page 138: Getting Git

commit

tree

blob

tree

tree blob

blob

branch

HEAD

Page 139: Getting Git

commit

tree

blob

tree

tree blob

blob

branch

HEAD

Page 140: Getting Git

commit

tree

blob

tree

tree blob

blob

branch

HEAD

Page 141: Getting Git

commit

tree

blob

tree

tree

commit

tree

blob

tree

tree blob

blob

branch

HEAD

tag

Page 142: Getting Git

commit

tree

blob

tree

tree

commit

tree

blob

tree

tree blob

blob

branch

HEAD

tag

Page 143: Getting Git

commit

tree

blob

tree

tree

commit

tree

blob

tree

tree blob

blob

branch

HEAD

tag

Page 144: Getting Git

commit

tree

blob

tree

tree

commit

tree

blob

tree

tree blob

blob

branch

HEAD

tag

Page 145: Getting Git

commit

tree

blob

tree

tree

commit

tree

blob

tree

tree blob

blob

branch

HEAD

tag

Page 146: Getting Git

commit

tree

blob

tree

tree

commit

tree

blob

tree

tree blob

blob

branch

HEAD

tag

Page 147: Getting Git

commit

tag

tree

blob

tree

tree

commit

tree

blob

tree

tree blob

commit

tree

blob

blob

branch

HEAD

Page 148: Getting Git

commit

tag

tree

blob

tree

tree

commit

tree

blob

tree

tree blob

commit

tree

blob

blob

branch

HEAD

Page 149: Getting Git

commit

tag

tree

blob

tree

tree

commit

tree

blob

tree

tree blob

commit

tree

blob

blob

branch

HEAD

Page 150: Getting Git

commit

tag

tree

blob

tree

tree

commit

tree

blob

tree

tree blob

commit

tree

blob

blob

branch

HEAD

Page 151: Getting Git

commit

tag

tree

blob

tree

tree

commit

tree

blob

tree

tree blob

commit

tree

blob

blob

branch

HEAD

Page 152: Getting Git

commit

tag

tree

blob

tree

tree

commit

tree

blob

tree

tree blob

commit

tree

blob

blob

branch

HEAD

Page 153: Getting Git

commit : a11bef

tag : 0c819c

tree : 1a738d

tree : fe8971

blob : a874b7

blob : a906cb

blob : a0a60a

README

Rakefile

lib

simplegit.rb

$ git checkout v0.1

.git/refs/tags/v0.1 "0c819c"

1

2

3

Page 154: Getting Git

commit : a11bef

tag : 0c819c

tree : 1a738d

tree : fe8971

blob : a874b7

blob : a906cb

blob : a0a60a

README

Rakefile

lib

simplegit.rb

$ git checkout v0.1

.git/refs/tags/v0.1 "0c819c"

1

2

3

Page 155: Getting Git

commit : a11bef

tag : 0c819c

tree : 1a738d

tree : fe8971

blob : a874b7

blob : a906cb

blob : a0a60a

README

Rakefile

lib

simplegit.rb

$ git checkout v0.1

.git/refs/tags/v0.1 "0c819c"

1

2

3

Page 156: Getting Git

commit : a11bef

tag : 0c819c

tree : 1a738d

tree : fe8971

blob : a874b7

blob : a906cb

blob : a0a60a

README

Rakefile

lib

simplegit.rb

$ git checkout v0.1

.git/refs/tags/v0.1 "0c819c"

1

2

3

Page 157: Getting Git

commit : a11bef

tag : 0c819c

tree : 1a738d

tree : fe8971

blob : a874b7

blob : a906cb

blob : a0a60a

README

Rakefile

lib

simplegit.rb

$ git checkout v0.1

.git/refs/tags/v0.1 "0c819c"

1

2

3

Page 158: Getting Git

the commit history

Page 159: Getting Git

blob

commit

treeC1}

branch

branch

Page 160: Getting Git

branching and merging

Page 161: Getting Git

C1

master

C0

C2 C3

experiment

HEAD

Page 162: Getting Git

C1

master

C0

C2 C3

experimentC1

master

C0

C2 C3

C4

experiment

C5

T1

git checkout -b experiment

HEAD

Page 163: Getting Git

C1

master

C0

C2 C3

experiment

C1

master

C0

C2 C3

C4

experiment

C5

T1

git commit

HEAD

Page 164: Getting Git

C1

master

C0

C2 C3

experiment

C1

master

C0

C2 C3

C4

experiment

C5

T1

git commitgit commit

HEAD

Page 165: Getting Git

C1

master

C0

C2 C3

experiment

C1

master

C0

C2 C3

C4

experiment

C5

T1

HEAD

git checkout master

Page 166: Getting Git

C1

master

C0

C2 C3

C4

experiment

C5

T1

C1

master

C0

C2 C3

C4

experiment

C5

T1git commit

HEAD

Page 167: Getting Git

C1

master

C0

C2 C3

C4

experiment

C5

T1

C1

master

C0

C2 C3

C4

experiment

C5

T1git tag -a ‘v1.1’

HEAD

Page 168: Getting Git

C1

master

C0

C2 C3

C4

experiment

C5

T1

git checkout experimentgit commit

HEAD

Page 169: Getting Git

C1C0

C2 C3

C4

experiment

C5

C6

masterT1

git checkout mastergit merge experiment

HEAD

Page 170: Getting Git

remotes

Page 171: Getting Git

C1

origin/master

C0 C2

masterC1

origin/master

C0 C2

master

Page 172: Getting Git

C1

origin/master

C0 C2

masterC1

origin/master

C0 C2

master

Page 173: Getting Git

C1

origin/master

C0 C2

master

C1

origin/master

C0 C2

master

Page 174: Getting Git

git fetch originCL1

origin/master

C0 CL2

master

CR3CR1 CR4

origin/idea

CR2

Page 175: Getting Git

CL1

origin/master

C0 CL2

master

CR3CR1 CR4

origin/idea

CR2

git fetch origin

Page 176: Getting Git

CL1

origin/master

C0 CL2

master

CR3CR1 CR4

origin/idea

CR2

git checkout -b tryidea

CL1

origin/master

C0 CL2

master

CR3CR1 CR4

origin/idea

CR2

tryidea

CL3

Page 177: Getting Git

CL1

origin/master

C0 CL2

master

CR3CR1 CR4

origin/idea

CR2

tryidea

CL3

git merge origin/master origin/idea

Page 178: Getting Git

CL1

origin/master

C0 CL2

master

CR3CR1 CR4

origin/idea

CR2

tryidea

CL3

Page 179: Getting Git

CL1

origin/master

C0 CL2

master

CR3CR1 CR4

origin/idea

CR2

Page 180: Getting Git

remote workflow

Page 181: Getting Git

public repo

local repo

local repo

public repo

internet

A B C

Page 182: Getting Git

public repo

local repo

local repo

public repo

git push(ssh)

internet

A B C

A B C

Page 183: Getting Git

public repo

local repo

local repo

public repo

git push(ssh)

git fetch(git)

internet

A B C

A B C

A B C

Page 184: Getting Git

public repo

local repo

local repo

public repo

git push(ssh)

git fetch(git)

internet

A B C

A B C

A B C

D E F git commit

Page 185: Getting Git

public repo

local repo

local repo

public repo

git push(ssh)

git fetch(git)

git push(ssh)

internet

A B C

A B C

A B C

D E F

A B C

D E F

Page 186: Getting Git

public repo

local repo

local repo

public repo

git fetch(http)

git push(ssh)

git fetch(git)

git push(ssh)

internet

A B C

A B C

A B C

D E F

A B C

D E F

D E F

Page 187: Getting Git

public repo

local repo

local repo

public repo

git fetch(http)

git push(ssh)

git fetch(git)

git push(ssh)

internet

A B C

A B C

A B C

D E F

A B C

D E F

D E FD E F

Page 188: Getting Git

multiple remotes

Page 189: Getting Git

developernick

developerjessica

my repo5ec

e4a4a7ce0 master

Page 190: Getting Git

developernick

developerjessica

my repo5ec

e4a4a7ce0 master

commit

Page 191: Getting Git

developernick

developerjessica

my repo5ec

e4a4a7ce0 master

tree

Page 192: Getting Git

developernick

developerjessica

my repo5ec

e4a4a7ce0 master

blobs

Page 193: Getting Git

schacon/project

developernick

developerjessica

"public"

my repo5ec

e4a4a7ce0 master

git push public

public/master

5ece4a

4a7ce0

Page 194: Getting Git

schacon/project

developerjessica

"public"

my repo5ec

e4a4a7ce0 master

git clone (url)

public/master

5ece4a

4a7ce0

5ece4a

4a7ce0developer

nick

Page 195: Getting Git

schacon/project

developerjessica

"public"

my repo5ec

e4a4a7ce0 master

git commit

public/master

5ece4a

4a7ce0

5ece4a

4a7ce0developer

nickc12ec524f

Page 196: Getting Git

schacon/project

"public"

my repo5ec

e4a4a7ce0 master

public/master

5ece4a

4a7ce0

5ece4a

4a7ce0developer

nickc12ec524f git clone (url)

5ece4a

4a7ce0developer

jessica

Page 197: Getting Git

schacon/project

"public"

my repo5ec

e4a4a7ce0 master

public/master

5ece4a

4a7ce0

5ece4a

4a7ce0developer

nickc12ec524f

5ece4a

4a7ce0developer

jessica2fbdf74ea

a09git commit

Page 198: Getting Git

schacon/project

"public"

my repo5ec

e4a4a7ce0 master

public/master

5ece4a

4a7ce0

5ece4a

4a7ce0developer

nickc12ec524f

5ece4a

4a7ce0developer

jessica2fbdf74ea

a09git push

5ece4a

4a7ce0nickh/project

c12ec524f

5ece4a

4a7ce0jessica/project

2fbdf74eaa09

Page 199: Getting Git

schacon/project

"public"

my repo5ec

e4a4a7ce0 master

public/master

5ece4a

4a7ce0

5ece4a

4a7ce0developer

nickc12ec524f

5ece4a

4a7ce0developer

jessica2fbdf74ea

a09

git remote add nick git://github.com/nickh/project.git

5ece4a

4a7ce0nickh/project

c12ec524f

5ece4a

4a7ce0jessica/project

2fbdf74eaa09"nick"

git remote add nick git://github.com/nickh/project.git

Page 200: Getting Git

schacon/project

"public"

my repo5ec

e4a4a7ce0 master

public/master

5ece4a

4a7ce0

5ece4a

4a7ce0developer

nickc12ec524f

5ece4a

4a7ce0developer

jessica2fbdf74ea

a09

git remote add nick git://github.com/nickh/project.git

5ece4a

4a7ce0nickh/project

c12ec524f

5ece4a

4a7ce0jessica/project

2fbdf74eaa09"nick"“nick”

git remote add nick git://github.com/nickh/project.git

Page 201: Getting Git

schacon/project

"public"

my repo5ec

e4a4a7ce0 master

public/master

5ece4a

4a7ce0

5ece4a

4a7ce0developer

nickc12ec524f

5ece4a

4a7ce0developer

jessica2fbdf74ea

a09

git remote add jess git://github.com/jessica/project.git

5ece4a

4a7ce0nickh/project

c12ec524f

5ece4a

4a7ce0jessica/project

2fbdf74eaa09"nick" "jess"

git remote add jess git://github.com/jessica/project.git

Page 202: Getting Git

schacon/project

"public"

my repo5ec

e4a4a7ce0 master

public/master

5ece4a

4a7ce0

5ece4a

4a7ce0developer

nickc12ec524f

5ece4a

4a7ce0developer

jessica2fbdf74ea

a09

git remote add jess git://github.com/jessica/project.git

5ece4a

4a7ce0nickh/project

c12ec524f

5ece4a

4a7ce0jessica/project

2fbdf74eaa09"nick" "jess"

git remote add jess git://github.com/jessica/project.git

“jess”

Page 203: Getting Git

schacon/project

"public"

my repo5ec

e4a4a7ce0 master

public/master

5ece4a

4a7ce0

5ece4a

4a7ce0developer

nickc12ec524f

5ece4a

4a7ce0developer

jessica2fbdf74ea

a09

git remote add jess git://github.com/jessica/project.git

5ece4a

4a7ce0nickh/project

c12ec524f

5ece4a

4a7ce0jessica/project

2fbdf74eaa09"nick" "jess"

schacon/project

"public"

my repo5ec

e4a4a7ce0 master

public/master

5ece4a

4a7ce0

5ece4a

4a7ce0developer

nickc12ec524f

5ece4a

4a7ce0developer

jessica2fbdf74ea

a09

git fetch nick

5ece4a

4a7ce0nickh/project

c12ec524f

5ece4a

4a7ce0jessica/project

2fbdf74eaa09"nick" "jess"

c12ec524f nick/master

git fetch nick

Page 204: Getting Git

schacon/project

"public"

my repo5ec

e4a4a7ce0 master

public/master

5ece4a

4a7ce0

5ece4a

4a7ce0developer

nickc12ec524f

5ece4a

4a7ce0developer

jessica2fbdf74ea

a09

git fetch nick

5ece4a

4a7ce0nickh/project

c12ec524f

5ece4a

4a7ce0jessica/project

2fbdf74eaa09"nick" "jess"

c12ec524f nick/master

Page 205: Getting Git

schacon/project

"public"

my repo5ec

e4a4a7ce0 master

public/master

5ece4a

4a7ce0

5ece4a

4a7ce0developer

nickc12ec524f

5ece4a

4a7ce0developer

jessica2fbdf74ea

a09

git remote add jess git://github.com/jessica/project.git

5ece4a

4a7ce0nickh/project

c12ec524f

5ece4a

4a7ce0jessica/project

2fbdf74eaa09"nick" "jess"

git fetch jess

schacon/project

"public"

my repo5ec

e4a4a7ce0 master

public/master

5ece4a

4a7ce0

5ece4a

4a7ce0developer

nickc12ec524f

5ece4a

4a7ce0developer

jessica2fbdf74ea

a09

git fetch jess

5ece4a

4a7ce0nickh/project

c12ec524f

5ece4a

4a7ce0jessica/project

2fbdf74eaa09"nick" "jess"

ec524f nick/master

2fbdf74eaa09

jess/masterc12

schacon/project

"public"

my repo5ec

e4a4a7ce0 master

public/master

5ece4a

4a7ce0

5ece4a

4a7ce0developer

nickc12ec524f

5ece4a

4a7ce0developer

jessica2fbdf74ea

a09

git fetch nick

5ece4a

4a7ce0nickh/project

c12ec524f

5ece4a

4a7ce0jessica/project

2fbdf74eaa09"nick" "jess"

c12ec524f nick/master

Page 206: Getting Git

schacon/project

"public"

my repo5ec

e4a4a7ce0 master

public/master

5ece4a

4a7ce0

5ece4a

4a7ce0developer

nickc12ec524f

5ece4a

4a7ce0developer

jessica2fbdf74ea

a09

git fetch jess

5ece4a

4a7ce0nickh/project

c12ec524f

5ece4a

4a7ce0jessica/project

2fbdf74eaa09"nick" "jess"

ec524f nick/master

2fbdf74eaa09

jess/masterc12

Page 207: Getting Git

schacon/project

"public"

my repo5ec

e4a4a7ce0

master

public/master

5ece4a

4a7ce0

5ece4a

4a7ce0developer

nickc12ec524f

5ece4a

4a7ce0developer

jessica2fbdf74ea

a09

5ece4a

4a7ce0nickh/project

c12ec524f

5ece4a

4a7ce0jessica/project

2fbdf74eaa09"nick" "jess"

ec524f nick/master

2fbdf74eaa09

jess/masterc12

b3bc63

git merge nick jess

Page 208: Getting Git

schacon/project

"public"

my repo5ec

e4a4a7ce0

master

public/master

5ece4a

4a7ce0

5ece4a

4a7ce0developer

nickc12ec524f

5ece4a

4a7ce0developer

jessica2fbdf74ea

a09

git push public

5ece4a

4a7ce0nickh/project

c12ec524f

5ece4a

4a7ce0jessica/project

2fbdf74eaa09"nick" "jess"

ec524f nick/master

2fbdf74eaa09

jess/masterc12

b3bc63

e4aec524f

2fbdf74eaa09

c12

b3bc63

Page 209: Getting Git

schacon/project

"public"

my repo5ec

e4a4a7ce0

master

public/master

5ece4a

4a7ce0

5ece4a

4a7ce0developer

nickc12ec524f

5ece4a

4a7ce0developer

jessica2fbdf74ea

a09

5ece4a

4a7ce0nickh/project

c12ec524f

5ece4a

4a7ce0jessica/project

2fbdf74eaa09"nick" "jess"

ec524f nick/master

2fbdf74eaa09

jess/masterc12

b3bc63

e4aec524f

2fbdf74eaa09

c12

b3bc63

Page 210: Getting Git

schacon/project

"public"

my repo5ec

e4a4a7ce0

master

public/master

5ece4a

4a7ce0

5ece4a

4a7ce0developer

nickc12ec524f

5ece4a

4a7ce0developer

jessica2fbdf74ea

a09

5ece4a

4a7ce0nickh/project

c12ec524f

5ece4a

4a7ce0jessica/project

2fbdf74eaa09"nick" "jess"

ec524f nick/master

2fbdf74eaa09

jess/masterc12

b3bc63

e4aec524f

2fbdf74eaa09

c12

b3bc63

Page 211: Getting Git

schacon/project

"public"

my repo5ec

e4a4a7ce0

master

public/master

5ece4a

4a7ce0

5ece4a

4a7ce0developer

nickc12ec524f

5ece4a

4a7ce0developer

jessica2fbdf74ea

a09

5ece4a

4a7ce0nickh/project

c12ec524f

5ece4a

4a7ce0jessica/project

2fbdf74eaa09"nick" "jess"

ec524f nick/master

2fbdf74eaa09

jess/masterc12

b3bc63

e4aec524f

2fbdf74eaa09

c12

b3bc63

Page 212: Getting Git

schacon/project

"public"

my repo5ec

e4a4a7ce0

master

public/master

5ece4a

4a7ce0

5ece4a

4a7ce0developer

nickc12ec524f

5ece4a

4a7ce0developer

jessica2fbdf74ea

a09

5ece4a

4a7ce0nickh/project

c12ec524f

5ece4a

4a7ce0jessica/project

2fbdf74eaa09"nick" "jess"

ec524f nick/master

2fbdf74eaa09

jess/masterc12

b3bc63

e4aec524f

2fbdf74eaa09

c12

b3bc63

Page 213: Getting Git

rebasing

Page 214: Getting Git

C1

C2

local jessica

master

Page 215: Getting Git

C1

masterC2

C1

C2

local jessica

master

git clone

Page 216: Getting Git

C1

master

C2

C3

C4

C1

C2

C5

C6

local jessica

master git commit

git commit

Page 217: Getting Git

C1

master

C2

C3

C4

C1

C2

local jessica

pack

master

git fetch jessC6

C5

Page 218: Getting Git

C1

jess/master

C2

C3

C4

C5

C6

local

master

Page 219: Getting Git

C1

jess/master

C2

C3

C4

C5

C6master

git merge

Page 220: Getting Git

C1

jess/master

C2

C3

C4

C5

C6

git merge

C7master

Page 221: Getting Git

C1

jess/master

C2

C3

C4

C5

C6

git merge

C7master

C1

jess/master

C2

C3

C4

C5

C6master

git rebase

Page 222: Getting Git

C3'

C4'

C3

C4

C1

jess/master

C2

C3

C4

C5

C6

git merge

C7master

C1

jess/master

C2

C5

C6

master

git rebase

Page 223: Getting Git

C3'

C4'

C3

C4

C1

jess/master

C2

C3

C4

C5

C6

git merge

C7master

C1

jess/master

C2

C5

C6

master

git rebase

Page 224: Getting Git

C3'

C4'

C3

C4

C1

jess/master

C2

C3

C4

C5

C6

git merge

C7master

C1

jess/master

C2

C5

C6

master

git rebase

1

2

Page 225: Getting Git

C3'

C4'

C3

C4

C1

jess/master

C2

C3

C4

C5

C6

git merge

C7master

C1

jess/master

C2

C5

C6

master

git rebase

1

2

Page 226: Getting Git

C3'

C4'

C3

C4

C1

jess/master

C2

C3

C4

C5

C6

git merge

C7master

C1

jess/master

C2

C5

C6

master

git rebase

Page 227: Getting Git

C3'

C4'

C1

jess/master

C2

C3

C4

C5

C6

git merge

C7master

C1

jess/master

C2

C5

C6

master

git rebase

Page 228: Getting Git

the treeish

Page 229: Getting Git

the treeish

alternate ways to refer to objects or ranges of objects

Page 230: Getting Git

Treeish

• full sha-1

• partial sha-1

• branch or tag name

• date spec

• ordinal spec

• carrot parent

• tilde spec

• tree pointer

• blob spec

• ranges

Page 231: Getting Git

Full SHA1

6e453f523fa1da50ecb04431101112b3611c6a4d

Page 232: Getting Git

Partial SHA16e453f523fa1da50ecb04431101112b3611c6a4d

6e453f523fa1da50

6e453

Page 233: Getting Git

Branch, Remote or Tag Name

v1.0

master

origin/testing

Page 234: Getting Git

Date Spec

master@{yesterday}

master@{1 month ago}

Page 235: Getting Git

Ordinal Spec

master@{5}

5th prior value of ‘master’

Page 236: Getting Git

Carrot Parent

master^2

2nd parent of ‘master’

Page 237: Getting Git

Tilde Spec

master~2

2nd generation grandparent of ‘master’

Page 238: Getting Git

Tree Pointer

master^{tree}

tree that ‘master’ points to

Page 239: Getting Git

Blob Spec

master:/path/to/file

blob of that file in ‘master’ commit

Page 240: Getting Git

Ranges

ce0e4..e4272

everything between two commits

Page 241: Getting Git

Ranges

ce0e4..

everything since a commit

Page 242: Getting Git

examples

Page 243: Getting Git

ce0e4

master

5ec47 2f45e 4eadf 2fbb3 18cae

b3be1 a09c6 df2fa c36ae

jess/master

Page 244: Getting Git

ce0e4

master

5ec47 2f45e 4eadf 2fbb3 18cae

b3be1 a09c6 df2fa c36ae

jess/master

master^

Page 245: Getting Git

ce0e4

master

5ec47 2f45e 4eadf 2fbb3 18cae

b3be1 a09c6 df2fa c36ae

jess/master

master^2

Page 246: Getting Git

ce0e4

master

5ec47 2f45e 4eadf 2fbb3 18cae

b3be1 a09c6 df2fa c36ae

jess/master

master~2

Page 247: Getting Git

ce0e4

master

5ec47 2f45e 4eadf 2fbb3 18cae

b3be1 a09c6 df2fa c36ae

jess/master

master^^^2master~2^2

Page 248: Getting Git

ce0e4

master

5ec47 2f45e 4eadf 2fbb3 18cae

b3be1 a09c6 df2fa c36ae

jess/master

master^^^2master~2^2

Page 249: Getting Git

ce0e4

master

5ec47 2f45e 4eadf 2fbb3 18cae

b3be1 a09c6 df2fa c36ae

jess/master

master^^^2master~2^2

Page 250: Getting Git

ce0e4

master

5ec47 2f45e 4eadf 2fbb3 18cae

b3be1 a09c6 df2fa c36ae

jess/master

master~3..master^

Page 251: Getting Git

local stuff

Page 252: Getting Git

the index

Page 253: Getting Git

Git Directoryconfig file

hooks

index

object database

references

Page 254: Getting Git

index

Page 255: Getting Git

index

working directory

repository

index

git add

git commit

Page 256: Getting Git

index

working directory

repository

index

git add

git commit

Page 257: Getting Git

index

working directory

repository

index

git add

git commit

Page 258: Getting Git

what?

Page 259: Getting Git

5ec

e4a

4a7

ce0

master

ec5

24f

c12

HEAD git wdir mtime fname

Object Directory Working DirectoryIndex

project/.git/index project/project/.git/objects

stage

Page 260: Getting Git

5ec

e4a

4a7

ce0

master

ec5

24f

c12

HEAD git wdir mtime fname

Object Directory Working DirectoryIndex

project/.git/index project/project/.git/objects

stage

git checkout

Page 261: Getting Git

5ec

e4a

4a7

ce0

master

ec5

24f

c12

HEAD

Object Directory Working Directory

project/project/.git/objects

e4a

24f

e4a

24f file1

file2

1:30

1:30

git wdir mtime fname

Index

project/.git/index

e4a

24f

stage

/file1

/file2

1:30

1:30

git checkout

5ec

e4a

4a7

ce0

master

ec5

24f

c12

HEAD git wdir mtime fname

Object Directory Working DirectoryIndex

project/.git/index project/project/.git/objects

stage

Page 262: Getting Git

5ec

e4a

4a7

ce0

master

ec5

24f

c12

HEAD

Object Directory Working Directory

project/project/.git/objects

e4a

24f

e4a

24f file1

file2

1:30

1:30

git wdir mtime fname

Index

project/.git/index

e4a

24f

stage

/file1

/file2

1:30

1:30

git checkout

5ec

e4a

4a7

ce0

master

ec5

24f

c12

HEAD git wdir mtime fname

Object Directory Working DirectoryIndex

project/.git/index project/project/.git/objects

stage

Page 263: Getting Git

5ec

e4a

4a7

ce0

master

ec5

24f

c12

HEAD

Object Directory Working Directory

project/project/.git/objects

e4a

24f

e4a

24f file1

file2

1:30

1:30

git wdir mtime fname

Index

project/.git/index

e4a

24f

stage

/file1

/file2

1:30

1:30

git checkout

5ec

e4a

4a7

ce0

master

ec5

24f

c12

HEAD git wdir mtime fname

Object Directory Working DirectoryIndex

project/.git/index project/project/.git/objects

stage

Page 264: Getting Git

5ec

e4a

4a7

ce0

master

ec5

24f

c12

HEAD

Object Directory Working Directory

project/project/.git/objects

e4a

24f

e4a

24f file1

file2

1:30

1:30

git wdir mtime fname

Index

project/.git/index

e4a

24f

stage

/file1

/file2

1:30

1:30

git checkout

5ec

e4a

4a7

ce0

master

ec5

24f

c12

HEAD git wdir mtime fname

Object Directory Working DirectoryIndex

project/.git/index project/project/.git/objects

stage

Page 265: Getting Git

5ec

e4a

4a7

ce0

master

ec5

24f

c12

HEAD

Object Directory Working Directory

project/project/.git/objects

e4a

24f

e4a

24f file1

file2

1:30

1:30

git wdir mtime fname

Index

project/.git/index

e4a

24f

stage

/file1

/file2

1:30

1:30

git checkout

5ec

e4a

4a7

ce0

master

ec5

24f

c12

HEAD git wdir mtime fname

Object Directory Working DirectoryIndex

project/.git/index project/project/.git/objects

stage

Page 266: Getting Git

5ec

e4a

4a7

ce0

master

ec5

24f

c12

HEAD

Object Directory Working Directory

project/project/.git/objects

e4a

24f

e4a

24f file1

file2

1:30

1:30

git wdir mtime fname

Index

project/.git/index

e4a

24f

stage

/file1

/file2

1:30

1:30

git checkout

Page 267: Getting Git

5ec

e4a

4a7

ce0

master

ec5

24f

c12

HEAD

Object Directory Working Directory

project/project/.git/objects

e4a

24f

e4a

24f file1

file2

1:30

1:30

git wdir mtime fname

Index

project/.git/index

e4a

24f

stage

/file1

/file2

1:30

1:31

vim file2

Page 268: Getting Git

5ec

e4a

4a7

ce0

master

ec5

24f

c12

HEAD

Object Directory Working Directory

project/project/.git/objects

1ba

24f

e4a

24f file1

file2

1:30

1:31

git wdir mtime fname

Index

project/.git/index

e4a

24f

stage

/file1

/file2

1:30

1:31

git status

Page 269: Getting Git

5ec

e4a

4a7

ce0

master

ec5

24f

c12

HEAD

Object Directory Working Directory

project/project/.git/objects

1ba

24f

e4a

24f file1

file2

1:30

1:31

git wdir mtime fname

Index

project/.git/index

e4a

24f

stage

/file1

/file2

1:30

1:31

git status

Page 270: Getting Git

5ec

e4a

4a7

ce0

master

ec5

24f

c12

HEAD

Object Directory Working Directory

project/project/.git/objects

1ba

24f

e4a

24f file1

file2

1:30

1:31

git wdir mtime fname

Index

project/.git/index

e4a

24f

stage

/file1

/file2

1:30

1:31

git status

Page 271: Getting Git

5ec

e4a

4a7

ce0

master

ec5

24f

c12

HEAD

Object Directory Working Directory

project/project/.git/objects

1ba

24f

e4a

24f file1

file2

1:30

1:31

git wdir mtime fname

Index

project/.git/index

e4a

24f

stage

/file1

/file2

1:30

1:31

Page 272: Getting Git

5ec

e4a

4a7

ce0

master

ec5

24f

c12

HEAD

Object Directory Working Directory

project/project/.git/objects

1ba

24f

e4a

24f file1

file2

1:30

1:31

git wdir mtime fname

Index

project/.git/index

1ba

24f

stage

/file1

/file2

1:30

1:311ba

git add file2

Page 273: Getting Git

5ec

e4a

4a7

ce0

master

ec5

24f

c12

HEAD

Object Directory Working Directory

project/project/.git/objects

1ba

24f

e4a

24f file1

file2

1:30

1:31

git wdir mtime fname

Index

project/.git/index

1ba

24f

stage

/file1

/file2

1:30

1:311ba

git add file2

Page 274: Getting Git

5ec

e4a

4a7

ce0

master

ec5

24f

c12

HEAD

Object Directory Working Directory

project/project/.git/objects

1ba

24f

e4a

24f file1

file2

1:30

1:31

git wdir mtime fname

Index

project/.git/index

1ba

24f

stage

/file1

/file2

1:30

1:311ba

git add file2

Page 275: Getting Git

5ec

e4a

4a7

ce0

master

ec5

24f

c12

HEAD

Object Directory Working Directory

project/project/.git/objects

1ba

24f

e4a

24f file1

file2

1:30

1:31

git wdir mtime fname

Index

project/.git/index

1ba

24f

stage

/file1

/file2

1:30

1:311ba

git add file2

Page 276: Getting Git

5ec

e4a

4a7

ce0

master

ec5

24f

c12

HEAD

Object Directory Working Directory

project/project/.git/objects

1ba

24f

e4a

24f file1

file2

1:30

1:31

git wdir mtime fname

Index

project/.git/index

1ba

24f

stage

/file1

/file2

1:30

1:311ba

git status

Page 277: Getting Git

5ec

e4a

4a7

ce0

master

ec5

24f

c12

HEAD

Object Directory Working Directory

project/project/.git/objects

1ba

24f

e4a

24f file1

file2

1:30

1:31

git wdir mtime fname

Index

project/.git/index

1ba

24f

stage

/file1

/file2

1:30

1:311ba

git status

Page 278: Getting Git

5ec

e4a

4a7

ce0

master

ec5

24f

c12

HEAD

Object Directory Working Directory

project/project/.git/objects

1ba

24f

1ba

24f file1

file2

1:30

1:31

git wdir mtime fname

Index

project/.git/index

1ba

24f

stage

/file1

/file2

1:30

1:311ba

a3e

83d

git commit

Page 279: Getting Git

5ec

e4a

4a7

ce0

master

ec5

24f

c12

HEAD

Object Directory Working Directory

project/project/.git/objects

1ba

24f

1ba

24f file1

file2

1:30

1:31

git wdir mtime fname

Index

project/.git/index

1ba

24f

stage

/file1

/file2

1:30

1:311ba

a3e

83d

git commit

Page 280: Getting Git

5ec

e4a

4a7

ce0

master

ec5

24f

c12

HEAD

Object Directory Working Directory

project/project/.git/objects

1ba

24f

1ba

24f file1

file2

1:30

1:31

git wdir mtime fname

Index

project/.git/index

1ba

24f

stage

/file1

/file2

1:30

1:311ba

a3e

83d

git commit

Page 281: Getting Git

5ec

e4a

4a7

ce0

master

ec5

24f

c12

HEAD

Object Directory Working Directory

project/project/.git/objects

1ba

24f

1ba

24f file1

file2

1:30

1:31

git wdir mtime fname

Index

project/.git/index

1ba

24f

stage

/file1

/file2

1:30

1:311ba

a3e

83d

git commit

Page 282: Getting Git

5ec

e4a

4a7

ce0

master

ec5

24f

c12

HEAD

Object Directory Working Directory

project/project/.git/objects

6d4

91b

1ba

24f file1

file2

1:32

1:32

git wdir mtime fname

Index

project/.git/index

1ba

24f

stage

/file1

/file2

1:32

1:321ba

a3e

83d

vim file1 file2 git status

Page 283: Getting Git

5ec

e4a

4a7

ce0

master

ec5

24f

c12

HEAD

Object Directory Working Directory

project/project/.git/objects

6d4

91b

1ba

24f file1

file2

1:32

1:32

git wdir mtime fname

Index

project/.git/index

1ba

24f

stage

/file1

/file2

1:32

1:321ba

a3e

83d

vim file1 file2 git status

Page 284: Getting Git

5ec

e4a

4a7

ce0

master

ec5

24f

c12

HEAD

Object Directory Working Directory

project/project/.git/objects

6d4

91b

1ba

24f file1

file2

1:32

1:32

git wdir mtime fname

Index

project/.git/index

1ba

24f

stage

/file1

/file2

1:32

1:321ba

a3e

83d

vim file1 file2 git status

Page 285: Getting Git

5ec

e4a

4a7

ce0

master

ec5

24f

c12

HEAD

Object Directory Working Directory

project/project/.git/objects

6d4

91b

1ba

24f file1

file2

1:32

1:32

git wdir mtime fname

Index

project/.git/index

1ba

91b

stage

/file1

/file2

1:32

1:321ba

a3e

83d

91b

git add file1

Page 286: Getting Git

5ec

e4a

4a7

ce0

master

ec5

24f

c12

HEAD

Object Directory Working Directory

project/project/.git/objects

6d4

91b

1ba

24f file1

file2

1:32

1:32

git wdir mtime fname

Index

project/.git/index

1ba

91b

stage

/file1

/file2

1:32

1:321ba

a3e

83d

91b

git add file1

Page 287: Getting Git

5ec

e4a

4a7

ce0

master

ec5

24f

c12

HEAD

Object Directory Working Directory

project/project/.git/objects

6d4

91b

1ba

24f file1

file2

1:32

1:32

git wdir mtime fname

Index

project/.git/index

1ba

91b

stage

/file1

/file2

1:32

1:321ba

a3e

83d

91b

git add file1

Page 288: Getting Git

5ec

e4a

4a7

ce0

master

ec5

24f

c12

HEAD

Object Directory Working Directory

project/project/.git/objects

6d4

91b

1ba

24f file1

file2

1:32

1:32

git wdir mtime fname

Index

project/.git/index

1ba

91b

stage

/file1

/file2

1:32

1:321ba

a3e

83d

91b

git status

Page 289: Getting Git

5ec

e4a

4a7

ce0

master

ec5

24f

c12

HEAD

Object Directory Working Directory

project/project/.git/objects

6d4

91b

1ba

24f file1

file2

1:32

1:32

git wdir mtime fname

Index

project/.git/index

1ba

91b

stage

/file1

/file2

1:32

1:321ba

a3e

83d

91b

git status

Page 290: Getting Git

5ec

e4a

4a7

ce0

master

ec5

24f

c12

HEAD

Object Directory Working Directory

project/project/.git/objects

6d4

91b

1ba

24f file1

file2

1:32

1:32

git wdir mtime fname

Index

project/.git/index

1ba

91b

stage

/file1

/file2

1:32

1:321ba

a3e

83d

91b

git status

Page 291: Getting Git

5ec

e4a

4a7

ce0

master

ec5

24f

c12

HEAD

Object Directory Working Directory

project/project/.git/objects

6d4

91b

1ba

91b file1

file2

1:32

1:32

git wdir mtime fname

Index

project/.git/index

1ba

91b

stage

/file1

/file2

1:32

1:321ba

a3e

83d

91b

1a7

6c5

git commit

Page 292: Getting Git

5ec

e4a

4a7

ce0

master

ec5

24f

c12

HEAD

Object Directory Working Directory

project/project/.git/objects

6d4

91b

1ba

91b file1

file2

1:32

1:32

git wdir mtime fname

Index

project/.git/index

1ba

91b

stage

/file1

/file2

1:32

1:321ba

a3e

83d

91b

1a7

6c5

git commit

Page 293: Getting Git

5ec

e4a

4a7

ce0

master

ec5

24f

c12

HEAD

Object Directory Working Directory

project/project/.git/objects

6d4

91b

1ba

91b file1

file2

1:32

1:32

git wdir mtime fname

Index

project/.git/index

1ba

91b

stage

/file1

/file2

1:32

1:321ba

a3e

83d

91b

1a7

6c5

Page 294: Getting Git

How Do I Use Git?

Page 295: Getting Git

2m Who is Scott?

What is Git?

How Does Git Work?

How Do I Use Git?

2m This Slide

3m

20m

12m

How Do I Deploy with Git?4m

Where Can I Learn More?2m

75%

35 min

15%

6 min

10%

4 min

75%

35 min

12m How Do I Use Git?

Page 296: Getting Git

152 Total Commands

Page 297: Getting Git

43 Porcelain Commands

Page 298: Getting Git

We’ll Cover Half

Page 299: Getting Git

getting git

Page 300: Getting Git

git.or.cz

Page 301: Getting Git

git.or.cz

wgetmake

make install

Page 302: Getting Git

yum install git-core

apt-get install git-core

port install git-core +svn

Page 303: Getting Git

setup

Page 304: Getting Git

git config --global user.name “Scott Chacon”

git config --global user.email “[email protected]

Page 305: Getting Git
Page 306: Getting Git
Page 307: Getting Git

1 Down

Page 308: Getting Git

getting a repo

Page 309: Getting Git

git clone

Page 310: Getting Git

Git Protocols

ssh://

http[s]://

git://

file:///

rsync://

Page 311: Getting Git

Git Protocols

ssh://

http[s]://

git://

file:///

rsync://

Page 312: Getting Git

Git Protocols

ssh://

http[s]://

git://

file:///

rsync://

push

Page 313: Getting Git

Git Protocols

ssh://

http[s]://

git://

file:///

rsync://

pull

Page 314: Getting Git

git clone

Page 315: Getting Git

git clone

Page 316: Getting Git

git clone

Page 317: Getting Git

git clone

Page 318: Getting Git

initializing a repo

cd myproject

git init

git add .

git commit

Page 319: Getting Git
Page 320: Getting Git
Page 321: Getting Git
Page 322: Getting Git
Page 323: Getting Git
Page 324: Getting Git
Page 325: Getting Git

5 Down

Page 326: Getting Git

normal workflow

Page 327: Getting Git

.gitignore

Page 328: Getting Git
Page 329: Getting Git
Page 330: Getting Git

adding and committing

Page 331: Getting Git
Page 332: Getting Git
Page 333: Getting Git
Page 334: Getting Git
Page 335: Getting Git
Page 336: Getting Git

working directory

repository

index

git add

git commit

Page 337: Getting Git
Page 338: Getting Git
Page 339: Getting Git

working directory

repository

index

git add

git commit

Page 340: Getting Git

git log

Page 341: Getting Git
Page 342: Getting Git
Page 343: Getting Git
Page 344: Getting Git
Page 345: Getting Git
Page 346: Getting Git
Page 347: Getting Git
Page 348: Getting Git
Page 349: Getting Git

git log --pretty

Page 350: Getting Git
Page 351: Getting Git
Page 352: Getting Git
Page 353: Getting Git
Page 354: Getting Git
Page 355: Getting Git
Page 356: Getting Git

6 Down

Page 357: Getting Git

git diff

Page 358: Getting Git

git diff (treeish1) (treeish2)

Page 359: Getting Git

git diff master^ > change.diff

Page 360: Getting Git

git diff master^ > change.diff

patch -p1 < change.diff

Page 361: Getting Git

git diff master^ > change.diff

patch -p1 < change.diff

git apply change.diffor

Page 362: Getting Git

git and patches

Page 363: Getting Git

Single Commit

git format-patch origin/master --stdout > story.patch

git am < story.patch

Page 364: Getting Git

Multiple Commits

$ git format-patch -o patches origin$ git send-email --to [email protected] patches

$ git am mbox

Page 365: Getting Git

Multiple Commits

$ git format-patch -o patches origin$ git send-email --to [email protected] patches

$ git am mbox

1 patch file per commitin this directory

Page 366: Getting Git

example: patching rails

Page 367: Getting Git

Patching Rails

git clone git://github.com/rails/rails.git

cd rails; (vim/emacs etc)

git format-patch origin/master --stdout > story.patch

upload story.patch to rails.lighthouseapp.com

Page 368: Getting Git

Applying a Rails Patch

download story.patch from rails.lighthouseapp.com

git am < story.patch

Page 369: Getting Git

11 Down

Page 370: Getting Git

branch, merge, rebase

Page 371: Getting Git

master

develop

topic

Page 372: Getting Git

master

develop

topic

Page 373: Getting Git

master

develop

topic

Page 374: Getting Git

master

develop

topic

Page 375: Getting Git

master

develop

topic

Page 376: Getting Git

master

develop

topic

Page 377: Getting Git

master

develop

topic

Page 378: Getting Git

master

develop

topic

“production”

Page 379: Getting Git

master

develop

topic

“production”

“trunk”

Page 380: Getting Git

master

develop

topic

“production”

“trunk”convention!

Page 381: Getting Git

branching workflow

normal development

want to try an idea

have to do a hotfix

merge idea into development

push to production

Page 382: Getting Git

branching workflow

normal development

want to try an idea

have to do a hotfix

merge idea into development

push to production

Page 383: Getting Git
Page 384: Getting Git
Page 385: Getting Git
Page 386: Getting Git
Page 387: Getting Git
Page 388: Getting Git
Page 389: Getting Git
Page 390: Getting Git

C3

master

C0

develop

story95

C4

C1 C2

idea

Page 391: Getting Git

branching workflow

normal development

want to try an idea

have to do a hotfix

merge idea into development

push to production

Page 392: Getting Git
Page 393: Getting Git
Page 394: Getting Git
Page 395: Getting Git

C3

master

C0

develop

story95

C4

C1 C2

idea

Page 396: Getting Git

C3

master

C0

develop

story95

C4

C1 C2

idea

Page 397: Getting Git
Page 398: Getting Git
Page 399: Getting Git

idea

C3

master

C0

develop

story95

C4

C1 C2

C5

C6

master

Page 400: Getting Git

branching workflow

normal development

want to try an idea

have to do a hotfix

merge idea into development

push to production

Page 401: Getting Git
Page 402: Getting Git
Page 403: Getting Git
Page 404: Getting Git
Page 405: Getting Git
Page 406: Getting Git

idea

C3

master

C0

develop

story95

C4

C1 C2

C5

C6

master

Page 407: Getting Git

branching workflow

normal development

want to try an idea

have to do a hotfix

merge idea into development

push to production

Page 408: Getting Git
Page 409: Getting Git
Page 410: Getting Git
Page 411: Getting Git
Page 412: Getting Git

develop

C3

C0

story95

C4

C1 C2

C5

C6

master

Page 413: Getting Git

branching workflow

normal development

want to try an idea

have to do a hotfix

merge idea into development

push to production

Page 414: Getting Git
Page 415: Getting Git
Page 416: Getting Git

develop

C3

C0

story95

C4

C1 C2

C5

C6 C7

master

Page 417: Getting Git
Page 418: Getting Git
Page 419: Getting Git

develop

C4C0

story95

C5

C1 C2

C6'C3

master

Page 420: Getting Git

develop

C4C0

story95

C5

C1 C2

C6'C3

master

Page 421: Getting Git

develop

C4C0

story95

C5

C1 C2

C6'C3

master

Page 422: Getting Git

develop

C3

C0

story95

C4

C1 C2

C5

C6 C7

master

merge

rebasedevelop

C4C0

story95

C5

C1 C2

C6'C3

master

Page 423: Getting Git

one more time now!

Page 424: Getting Git

C3

master

C0

develop

story95

C4

C1 C2

idea

Page 425: Getting Git

C3

master

C0

develop

story95

C4

C1 C2

idea

git checkout -b idea

Page 426: Getting Git

idea

C3

master

C0

develop

story95

C4

C1 C2

C5

C6

master

git commit

Page 427: Getting Git

idea

C3

master

C0

develop

story95

C4

C1 C2

C5

C6

master

git checkout mastergit commit

Page 428: Getting Git

develop

C3

C0

story95

C4

C1 C2

C5

C6

master

git checkout ideagit merge developgit branch -d idea

Page 429: Getting Git

develop

C3

C0

story95

C4

C1 C2

C5

C6 C7

master

git checkout mastergit merge develop

Page 430: Getting Git

17 Down

Page 431: Getting Git

sharing git

Page 432: Getting Git
Page 433: Getting Git
Page 434: Getting Git
Page 435: Getting Git
Page 436: Getting Git
Page 437: Getting Git
Page 438: Getting Git
Page 439: Getting Git
Page 440: Getting Git
Page 441: Getting Git
Page 442: Getting Git
Page 443: Getting Git
Page 444: Getting Git
Page 445: Getting Git
Page 446: Getting Git
Page 447: Getting Git
Page 448: Getting Git
Page 449: Getting Git

git clone git://github.com/schacon/simplegit2.git

Page 450: Getting Git

distributed workflow

Page 451: Getting Git

distributed workflowfetch, pull and push

Page 452: Getting Git

fetch

Page 453: Getting Git
Page 454: Getting Git
Page 455: Getting Git
Page 456: Getting Git
Page 457: Getting Git
Page 458: Getting Git
Page 459: Getting Git

pull

Page 460: Getting Git

pull = fetch + merge

Page 461: Getting Git

push

Page 462: Getting Git
Page 463: Getting Git
Page 464: Getting Git
Page 465: Getting Git

git push

Page 466: Getting Git
Page 467: Getting Git

We Know Em All!

Page 468: Getting Git

review

Page 469: Getting Git

• Local Commands

• git config

• git init

• git add

• git commit

• git status

• git tag

• git log

Page 470: Getting Git

• Local Commands

• git config

• git init

• git add

• git commit

• git status

• git tag

• git log

• Branchy Commands

• git checkout

• git branch

• git merge

• git rebase

Page 471: Getting Git

• Local Commands

• git config

• git init

• git add

• git commit

• git status

• git tag

• git log

• Branchy Commands

• git checkout

• git branch

• git merge

• git rebase

• Remotey Commands

• git remote

• git fetch

• git pull

• git clone

• git push

Page 472: Getting Git

• Local Commands

• git config

• git init

• git add

• git commit

• git status

• git tag

• git log

• Branchy Commands

• git checkout

• git branch

• git merge

• git rebase

• Remotey Commands

• git remote

• git fetch

• git pull

• git clone

• git push

• Patchy Commands

• git diff

• git apply

• git format-patch

• git am

Page 473: Getting Git

• Local Commands

• git config

• git init

• git add

• git commit

• git status

• git tag

• git log

• Branchy Commands

• git checkout

• git branch

• git merge

• git rebase

• Remotey Commands

• git remote

• git fetch

• git pull

• git clone

• git push

• Patchy Commands

• git diff

• git apply

• git format-patch

• git am

Page 474: Getting Git

popular workflows

Page 475: Getting Git

central repository model

Page 476: Getting Git

developerdeveloper

developer

shared repositorydeveloper

developer

developer

developerdeveloper

developer

Page 477: Getting Git

developer

shared repository

developer developer

git clone

Page 478: Getting Git

developer

shared repository

developer developer

git push

Page 479: Getting Git

developer

shared repository

developer developer

git push

Page 480: Getting Git

developer

shared repository

developer developer

Page 481: Getting Git

developer

shared repository

developer developer

git fetchgit merge

Page 482: Getting Git

developer

shared repository

developer developer

git push

Page 483: Getting Git

dictator and lieutenants model

Page 484: Getting Git

developerdeveloper

dictator

developer

lieutenant

blessed repository

developer

lieutenant

Page 485: Getting Git

developerdeveloper

dictator

developer

lieutenant

blessed repository

developer

lieutenant

git clone

Page 486: Getting Git

developerdeveloper

dictator

developer

lieutenant

blessed repository

developer

lieutenant

git fetchgit merge

Page 487: Getting Git

developerdeveloper

dictator

developer

lieutenant

blessed repository

developer

lieutenant

git fetchgit merge

Page 488: Getting Git

developerdeveloper

dictator

developer

lieutenant

blessed repository

developer

lieutenant

git fetch; git merge

Page 489: Getting Git

developerdeveloper

dictator

developer

lieutenant

blessed repository

developer

lieutenant

git push

Page 490: Getting Git

developerdeveloper

dictator

developer

lieutenant

blessed repository

developer

lieutenant

git fetch

Page 491: Getting Git

integration manager model

Page 492: Getting Git

developerpublic

developerpublic

integration manager

blessedrepository

developerprivate

developerprivate

Page 493: Getting Git

developerpublic

developerpublic

integration manager

blessedrepository

developerprivate

developerprivate

github.com/schacon/ticgit

/yob/ticgit /pope/ticgit

Page 494: Getting Git

developerpublic

developerpublic

integration manager

blessedrepository

developerprivate

developerprivate

github.com/schacon/ticgit

/yob/ticgit /pope/ticgit“forks”

Page 495: Getting Git

developerpublic

developerpublic

integration manager

blessedrepository

developerprivate

developerprivate

git push

Page 496: Getting Git

developerpublic

developerpublic

integration manager

blessedrepository

developerprivate

developerprivate

git clone

Page 497: Getting Git

developerpublic

developerpublic

integration manager

blessedrepository

developerprivate

developerprivate

git push

Page 498: Getting Git

developerpublic

developerpublic

integration manager

blessedrepository

developerprivate

developerprivate

git fetchgit merge

Page 499: Getting Git

developerpublic

developerpublic

integration manager

blessedrepository

developerprivate

developerprivate

git push

Page 500: Getting Git

developerpublic

developerpublic

integration manager

blessedrepository

developerprivate

developerprivate

git fetchgit rebase / merge

Page 501: Getting Git

developerpublic

developerpublic

integration manager

blessedrepository

developerprivate

developerprivate

git push

Page 502: Getting Git

How Do I Deploy with Git?

Page 503: Getting Git

2m Who is Scott?

What is Git?

How Does Git Work?

How Do I Use Git?

2m This Slide

3m

20m

12m

How Do I Deploy with Git?4m

Where Can I Learn More?2m

75%

35 min

15%

6 min

10%

4 min

4m How Do I Deploy with Git?15%

6 min

Page 504: Getting Git

capistrano + git

Page 505: Getting Git

deploy.rb

Page 506: Getting Git

deploy.rb

Page 507: Getting Git

deploy.rb

Page 508: Getting Git
Page 509: Getting Git
Page 510: Getting Git
Page 511: Getting Git

other cap options

set :branch, "master"

set :git_shallow_clone, 1

set :git_enable_submodules, 1

Page 512: Getting Git

ruby + git

Page 513: Getting Git

ruby + git

grit

git gem

git-ruby

Page 514: Getting Git

ruby + git

grit

git gem

git-ruby

Page 515: Getting Git
Page 516: Getting Git
Page 517: Getting Git

github.com/schacon/ruby-git

Page 518: Getting Git

Where Can I Learn More?

Page 519: Getting Git

2m Who is Scott?

What is Git?

How Does Git Work?

How Do I Use Git?

2m This Slide

3m

20m

12m

How Do I Deploy with Git?4m

Where Can I Learn More?2m

75%

35 min

15%

6 min

10%

4 min

2m Where Can I Learn More?

15%

6 min

Page 520: Getting Git

Resourcesgit.or.cz

gitcasts.com

del.icio.us/popular/git

#git / #github on IRC

peepcode - git book and screencast

[email protected]

me. here.

Page 521: Getting Git

thats it!

Page 522: Getting Git

thats it!

gitcasts.com/git-talknotes, these slides, etc

Page 523: Getting Git

thats it!

gitcasts.com/git-talknotes, these slides, etc

git.or.cz

gitcasts.com

del.icio.us/popular/git

#git / #github on IRC

peepcode

[email protected]