how to use git to solve world hungerchacon.s3.amazonaws.com/gittalk-sor09.pdf · no changes added...

528
How to Use Git to Solve World Hunger a humble talk by Scott Chacon

Upload: others

Post on 13-Jul-2020

48 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

How to Use Git to Solve World Hunger

a humble talk by Scott Chacon

Page 2: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

Me

Page 3: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

Scott Chacon

Page 4: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files
Page 5: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files
Page 6: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

github.com/schacon

Page 7: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

github.com/schacon

Page 8: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files
Page 9: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files
Page 10: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

git-scm.com

Page 11: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

book.git-scm.com

Page 13: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

</me>

Page 14: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

Git Crash Course

Page 15: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

What is Git?

Page 16: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

Git is an open source, distributed version control system designed for speed

and efficiency

Page 17: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

Git is an open source, distributed version control system designed for speed and

efficiency

Page 18: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

version control

Page 19: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

version control

subversion (svn)

mercurial (hg)

visual source safe

bazaar

concurrent version system (cvs)

perforce

Page 20: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

version control

subversion (svn)

mercurial (hg)

visual source safe

bazaar

concurrent version system (cvs)

perforce

SoS

Page 21: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

version control

subversion (svn)

mercurial (hg)

visual source safe

bazaar

concurrent version system (cvs)

perforce

SoS“not bad”

Page 22: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

version control

subversion (svn)

mercurial (hg)

visual source safe

bazaar

concurrent version system (cvs)

perforce

SoS

“kill self”

Page 23: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

version control

subversion (svn)

mercurial (hg)

visual source safe

bazaar

concurrent version system (cvs)

perforce

git

Page 24: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

Git is an open source, distributed version control system designed for speed

and efficiency

Page 25: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

git-scm.com

Page 26: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

Git is an open source, distributed version control

system designed for speed and efficiency

Page 27: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

Fully Distributed

Page 28: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

(almost) everything is local

Page 29: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

which means

Page 30: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

which means

everything is fast

Page 31: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

which means

everything is fast

every clone is a backup

Page 32: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

which means

everything is fast

every clone is a backup

work offline

Page 33: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

Git is an open source, distributed version control

system designed for speed and efficiency

Page 34: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files
Page 35: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

Immutable

Page 36: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

(almost) never removes data

Page 37: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

Snapshots, not Patches

Page 38: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

deltastorage

!

!

! !

! ! !

snapshotstorage

Page 39: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

deltastorage

!

!

! !

! ! !

snapshotstorage

Page 40: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

deltastorage

!

!

! !

! ! !

snapshotstorage

Page 41: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

deltastorage

!

!

! !

! ! !

snapshotstorage

Page 42: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

deltastorage

!

!

! !

! ! !

snapshotstorage

Page 43: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

deltastorage

!

!

! !

! ! !

snapshotstorage

Page 44: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

deltastorage

!

!

! !

! ! !

snapshotstorage

Page 45: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

deltastorage

!

!

! !

! ! !

snapshotstorage

Page 46: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

deltastorage

!

!

! !

! ! !

snapshotstorage

Page 47: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

deltastorage

!

!

! !

! ! !

snapshotstorage

Page 48: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

deltastorage

!

!

! !

! ! !

snapshotstorage

Page 49: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

deltastorage

!

!

! !

! ! !

snapshotstorage

Page 50: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

deltastorage

!

!

! !

! ! !

snapshotstorage

Page 51: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

Why Git?

Page 52: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

git ist schnell!

Page 53: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

No Network Needed

Page 54: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

No Network Needed

Performing a diff

Page 55: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

No Network Needed

Performing a diff

Viewing file history

Page 56: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

No Network Needed

Performing a diff

Viewing file history

Committing changes

Page 57: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

No Network Needed

Performing a diff

Viewing file history

Committing changes

Merging branches

Page 58: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

No Network Needed

Performing a diff

Viewing file history

Committing changes

Merging branches

Obtaining any other revision of a file

Page 59: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

No Network Needed

Performing a diff

Viewing file history

Committing changes

Merging branches

Obtaining any other revision of a file

Switching branches

Page 60: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

jQuery tests

Page 61: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files
Page 62: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files
Page 63: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files
Page 64: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files
Page 65: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files
Page 66: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files
Page 67: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

more workflows

Page 68: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

centralized

Page 69: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

developer

shared repository

developer developer

Page 70: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

developer

shared repository

developer developer

Page 71: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

developer

shared repository

developer developer

Page 72: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

developer

shared repository

developer developer

Page 73: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

developer

shared repository

developer developer

Page 74: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

developer

shared repository

developer developer

Page 75: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

developer

shared repository

developer developer

Page 76: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

integration manager

Page 77: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

integration manager

blessedrepository

Page 78: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

integration manager

blessedrepository

developerprivate

developerprivate

Page 79: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

developerpublic

developerpublic

integration manager

blessedrepository

developerprivate

developerprivate

Page 80: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

developerpublic

developerpublic

integration manager

blessedrepository

developerprivate

developerprivate

Page 81: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

developerpublic

developerpublic

integration manager

blessedrepository

developerprivate

developerprivate

Page 82: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

dictator / lieutenant

Page 83: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

dictator

lieutenant

lieutenant

Page 84: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

dictator

lieutenant

blessed repository

lieutenant

Page 85: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

developerdeveloper

dictator

developer

lieutenant

blessed repository

developer

lieutenant

Page 86: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

developerdeveloper

dictator

developer

lieutenant

blessed repository

developer

lieutenant

Page 87: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

developerdeveloper

dictator

developer

lieutenant

blessed repository

developer

lieutenant

Page 88: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

developerdeveloper

dictator

developer

lieutenant

blessed repository

developer

lieutenant

Page 89: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

developerdeveloper

dictator

developer

lieutenant

blessed repository

developer

lieutenant

Page 90: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

developerdeveloper

dictator

developer

lieutenant

blessed repository

developer

lieutenant

Page 91: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

cheap local branching

Page 92: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

cheap local branchingand easy merging

Page 93: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

$ du -h testrepo/ 78M testrepo/$ cd testrepo/$ time git checkout -b newbranchSwitched to a new branch "newbranch"

real 0m0.091suser 0m0.016ssys 0m0.023s

Page 94: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

$ du -h testrepo/ 78M testrepo/$ cd testrepo/$ time git checkout -b newbranchSwitched to a new branch "newbranch"

real 0m0.091suser 0m0.016ssys 0m0.023s

Page 95: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

$ du -h testrepo/ 78M testrepo/$ cd testrepo/$ time git checkout -b newbranchSwitched to a new branch "newbranch"

real 0m0.091suser 0m0.016ssys 0m0.023s

Page 96: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

$ du -h testrepo/ 78M testrepo/$ cd testrepo/$ time git checkout -b newbranchSwitched to a new branch "newbranch"

real 0m0.091suser 0m0.016ssys 0m0.023s

Page 97: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

$ du -h testrepo/ 78M testrepo/$ cd testrepo/$ time git checkout -b newbranchSwitched to a new branch "newbranch"

real 0m0.091suser 0m0.016ssys 0m0.023s

Page 98: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

$ time cp -Rf testrepo r2

real0m13.684suser0m0.085ssys 0m1.215s

Page 99: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

13.68 vs 0.09

Page 100: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

so what?

Page 101: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

frictionless context switching

Page 102: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files
Page 103: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

try out new ideas

Page 104: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

non-linear development

Page 105: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

C1

C0

master

Page 106: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

C1

C0

master

C2

Page 107: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

C1

C0

master

C2

story53

C3

C4

Page 108: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

C1

C0

master

C2

story53

C3

C4

story53v2

C5

C6

Page 109: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

C1

C0

master

C2

story53

C3

C4

story53v2

C5

C6

story103

C7

C8

Page 110: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

C1

C0

master

C2

story53

C3

C4

story53v2

C5

C6story103

C7

C8

Page 111: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

C1

C0

master

C2

story53

C3

C4

story53v2

C5

C6

C7

C8

C9

Page 112: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

no necessary SPOF

Page 113: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

developer

shared repository

developer developer

Page 114: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

developer

shared repository

developer developer

Page 115: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

developer

shared repository

developer developer developer

shared repository

developer developer

Page 116: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

developer

shared repository

developer developer developer

shared repository

developer developer

Page 117: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

developer

shared repository

developer developer developer

shared repository

developer developer

Page 118: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

developer

shared repository

developer developer

temp repository

developer

shared repository

developer developer developer

shared repository

developer developer

Page 119: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

developer

shared repository

developer developer

temp repository

developer

shared repository

developer developer developer

shared repository

developer developer

Page 120: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

How Do I Use Git?

Page 121: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

First Steps

Page 122: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

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

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

Page 123: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

Getting A Repo

Page 124: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

git init

Page 125: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

$ touch hello_world.rb$ git init$ git add .$ git commit -m ‘first commit’

Page 126: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

$ touch hello_world.rb$ git init$ git add .$ git commit -m ‘first commit’

Page 127: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

$ tree -a.|-- .git| |-- HEAD| |-- branches| |-- config| |-- description| |-- hooks| | |-- post-commit.sample| | |-- post-receive.sample| | |-- ...| | |-- pre-rebase.sample| | `-- update.sample| |-- info| | `-- exclude| |-- objects| | |-- info| | `-- pack| |-- refs| | |-- heads| | `-- tags| `-- remotes`-- hello_world.rb

11 directories, 25 files

Page 128: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

$ tree -a.|-- .git| |-- HEAD| |-- branches| |-- config| |-- description| |-- hooks| | |-- post-commit.sample| | |-- post-receive.sample| | |-- ...| | |-- pre-rebase.sample| | `-- update.sample| |-- info| | `-- exclude| |-- objects| | |-- info| | `-- pack| |-- refs| | |-- heads| | `-- tags| `-- remotes`-- hello_world.rb

11 directories, 25 files

Page 129: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

$ tree -a.|-- .git| |-- HEAD| |-- branches| |-- config| |-- description| |-- hooks| | |-- post-commit.sample| | |-- post-receive.sample| | |-- ...| | |-- pre-rebase.sample| | `-- update.sample| |-- info| | `-- exclude| |-- objects| | |-- info| | `-- pack| |-- refs| | |-- heads| | `-- tags| `-- remotes`-- hello_world.rb

11 directories, 25 files

Page 130: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

git clone

Page 131: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

$ git clone

Page 132: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

$ git clone git://github.com/schacon/grit.git

Page 133: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

$ git clone git://github.com/schacon/grit.git mygrit

Page 134: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

$ git clone git://github.com/schacon/grit.git mygritInitialized empty Git repository in /home/schacon/mygrit/.git/remote: Counting objects: 3220, done.remote: Compressing objects: 100% (2093/2093), done.remote: Total 3220 (delta 1134), reused 3149 (delta 1081)Receiving objects: 100% (3220/3220), 1.79 MiB | 357 KiB/s, done.Resolving deltas: 100% (1134/1134), done.

Page 135: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

$ git clone git://github.com/schacon/grit.git mygritInitialized empty Git repository in /home/schacon/mygrit/.git/remote: Counting objects: 3220, done.remote: Compressing objects: 100% (2093/2093), done.remote: Total 3220 (delta 1134), reused 3149 (delta 1081)Receiving objects: 100% (3220/3220), 1.79 MiB | 357 KiB/s, done.Resolving deltas: 100% (1134/1134), done.

$ cd mygrit$

Page 136: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

$ git clone git://github.com/schacon/grit.git mygritInitialized empty Git repository in /home/schacon/mygrit/.git/remote: Counting objects: 3220, done.remote: Compressing objects: 100% (2093/2093), done.remote: Total 3220 (delta 1134), reused 3149 (delta 1081)Receiving objects: 100% (3220/3220), 1.79 MiB | 357 KiB/s, done.Resolving deltas: 100% (1134/1134), done.

$ cd mygrit$ lsAPI.txt Manifest.txtREADME.txt benchmarks.rb examples libHistory.txt PURE_TODORakefile benchmarks.txt grit.gemspectest$

Page 137: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

A Basic Workflow

Page 138: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

A Basic Workflow

Edit files

Stage the changes

Review your changes

Commit the changes

Page 139: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

working directory

repository

index

git add

git commit

Page 140: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

working directory

repository

index

git add

git commit

a working copy of your project

Page 141: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

working directory

repository

index

git add

git commit

object database

Page 142: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

working directory

repository

index

git add

git commit

“staging”

Page 143: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

A Basic Workflow

Edit files

Stage the changes

Review your changes

Commit the changes

Page 144: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

$ find ../app.yaml./index.yaml./main.py

Page 145: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

$ find ../app.yaml./index.yaml./main.py

Page 146: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

$ find ../app.yaml./index.yaml./main.py

Page 147: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

#!/usr/bin/env pythonimport wsgiref.handlersfrom google.appengine.ext import webapp

class MainHandler(webapp.RequestHandler):

def get(self): self.response.out.write('Hello world!')

def main(): application = webapp.WSGIApplication([('/', MainHandler)], debug=True) wsgiref.handlers.CGIHandler().run(application)

if __name__ == '__main__': main()~ ~ "main.py" 16L, 402C

$ vim main.py

Page 148: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

#!/usr/bin/env pythonimport wsgiref.handlersfrom google.appengine.ext import webapp

class MainHandler(webapp.RequestHandler):

def get(self): self.response.out.write('Hello world!')

def main(): application = webapp.WSGIApplication([('/', MainHandler)], debug=True) wsgiref.handlers.CGIHandler().run(application)

if __name__ == '__main__': main()~ ~ "main.py" 16L, 402C

$ vim main.py

Page 149: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

#!/usr/bin/env pythonimport wsgiref.handlersfrom google.appengine.ext import webapp

class MainHandler(webapp.RequestHandler):

def get(self): self.response.out.write('Hello world!')

def main(): application = webapp.WSGIApplication([('/', MainHandler)], debug=True) wsgiref.handlers.CGIHandler().run(application)

if __name__ == '__main__': main()~ ~ "main.py" 16L, 402C

$ vim main.py

Page 150: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

#!/usr/bin/env pythonimport wsgiref.handlersfrom google.appengine.ext import webapp

# this program prints out ‘hello world’

class MainHandler(webapp.RequestHandler):

def get(self): self.response.out.write('Hello world!')

def main(): application = webapp.WSGIApplication([('/', MainHandler)], debug=True) wsgiref.handlers.CGIHandler().run(application)

if __name__ == '__main__': main()~ ~ "main.py" 16L, 402C

$ vim main.py

Page 151: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

$ git status

Page 152: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

$ git status# On branch master# Changed but not updated:# (use "git add <file>..." to update what will be committed)##modified: main.py#no changes added to commit (use "git add" and/or "git commit -a")

Page 153: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

$ git status# On branch master# Changed but not updated:# (use "git add <file>..." to update what will be committed)##modified: main.py#no changes added to commit (use "git add" and/or "git commit -a")

Page 154: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

$ git status# On branch master# Changed but not updated:# (use "git add <file>..." to update what will be committed)##modified: main.py#no changes added to commit (use "git add" and/or "git commit -a")

Page 155: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

$ git status# On branch master# Changed but not updated:# (use "git add <file>..." to update what will be committed)##modified: main.py#no changes added to commit (use "git add" and/or "git commit -a")

STAGED

Page 156: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

A Basic Workflow

Edit files

Stage the changes

Review your changes

Commit the changes

Page 157: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

git add

Page 158: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

working directory

repository

index

git add

git commit

Page 159: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

working directory

repository

index

git add

git commit

Page 160: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

$ git add main.py$ git status# On branch master# Changes to be committed:# (use "git reset HEAD <file>..." to unstage)##modified: main.py#

Page 161: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

$ git add main.py$ git status# On branch master# Changes to be committed:# (use "git reset HEAD <file>..." to unstage)##modified: main.py#

Page 162: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

$ git add main.py$ git status# On branch master# Changes to be committed:# (use "git reset HEAD <file>..." to unstage)##modified: main.py#

Page 163: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

# On branch master# Changes to be committed:# (use "git reset HEAD <file>..." to unstage)##modified: main.py#

$ git add main.py$ git status

Page 164: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

# On branch master# Changes to be committed:# (use "git reset HEAD <file>..." to unstage)##modified: main.py#

$ git add main.py$ git status

THAT ARE STAGED

Page 165: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

$ vim app.yamlapplication: chaconversion: 1runtime: pythonapi_version: 1

handlers:- url: .* script: main.py~ ~ ~ "app.yaml" 8L, 101C

Page 166: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

$ vim app.yamlapplication: chaconversion: 1runtime: pythonapi_version: 1

handlers:- url: .* script: main.py~ ~ ~ "app.yaml" 8L, 101C

Page 167: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

$ vim app.yamlapplication: chaconversion: 1runtime: pythonapi_version: 1

handlers:- url: .* script: main.py~ ~ ~ "app.yaml" 8L, 101C

Page 168: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

application: chaconversion: 1runtime: pythonapi_version: 1

handlers:- url: .* script: main.py~ ~ ~ "app.yaml" 8L, 101C

$ vim app.yaml

Page 169: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

application: chaconversion: 2runtime: pythonapi_version: 1

handlers:- url: .* script: main.py~ ~ ~ "app.yaml" 8L, 101C

$ vim app.yaml

Page 170: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

# On branch master# Changes to be committed:# (use "git reset HEAD <file>..." to unstage)## modified: main.py## Changed but not updated:# (use "git add <file>..." to update what will be committed)## modified: app.yaml#

$ git status

Page 171: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

# On branch master# Changes to be committed:# (use "git reset HEAD <file>..." to unstage)## modified: main.py## Changed but not updated:# (use "git add <file>..." to update what will be committed)## modified: app.yaml#

$ git status

Page 172: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

# On branch master# Changes to be committed:# (use "git reset HEAD <file>..." to unstage)## modified: main.py## Changed but not updated:# (use "git add <file>..." to update what will be committed)## modified: app.yaml#

$ git status

Page 173: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

$ vim main.py#!/usr/bin/env pythonimport wsgiref.handlersfrom google.appengine.ext import webapp

# this program prints out ‘hello world’

class MainHandler(webapp.RequestHandler):

def get(self): self.response.out.write('Hello world!')

def main(): application = webapp.WSGIApplication([('/', MainHandler)], debug=True) wsgiref.handlers.CGIHandler().run(application)

if __name__ == '__main__': main()~ ~ "main.py" 16L, 402C

Page 174: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

$ vim main.py#!/usr/bin/env pythonimport wsgiref.handlersfrom google.appengine.ext import webapp

# this program prints out ‘hello world’

class MainHandler(webapp.RequestHandler):

def get(self): self.response.out.write('Hello world!')

def main(): application = webapp.WSGIApplication([('/', MainHandler)], debug=True) wsgiref.handlers.CGIHandler().run(application)

if __name__ == '__main__': main()~ ~ "main.py" 16L, 402C

Page 175: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

$ vim main.py#!/usr/bin/env pythonimport wsgiref.handlersfrom google.appengine.ext import webapp

# this program prints out ‘hello world’

class MainHandler(webapp.RequestHandler):

def get(self): self.response.out.write('Hello world!')

def main(): application = webapp.WSGIApplication([('/', MainHandler)], debug=True) wsgiref.handlers.CGIHandler().run(application)

if __name__ == '__main__': main()~ ~ "main.py" 16L, 402C

Page 176: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

#!/usr/bin/env pythonimport wsgiref.handlersfrom google.appengine.ext import webapp

# this program prints out ‘hello world’

class MainHandler(webapp.RequestHandler):

def get(self): self.response.out.write('Hola world!')

def main(): application = webapp.WSGIApplication([('/', MainHandler)], debug=True) wsgiref.handlers.CGIHandler().run(application)

if __name__ == '__main__': main()~ ~ "main.py" 16L, 402C

$ vim main.py

Page 177: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

#!/usr/bin/env pythonimport wsgiref.handlersfrom google.appengine.ext import webapp

# this program prints out ‘hello world’

class MainHandler(webapp.RequestHandler):

def get(self): self.response.out.write('Hola Mundo!')

def main(): application = webapp.WSGIApplication([('/', MainHandler)], debug=True) wsgiref.handlers.CGIHandler().run(application)

if __name__ == '__main__': main()~ ~ "main.py" 16L, 402C

$ vim main.py

Page 178: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

# On branch master# Changes to be committed:# (use "git reset HEAD <file>..." to unstage)## modified: main.py## Changed but not updated:# (use "git add <file>..." to update what will be committed)## modified: app.yaml# modified: main.py#

$ git status

Page 179: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

# On branch master# Changes to be committed:# (use "git reset HEAD <file>..." to unstage)## modified: main.py## Changed but not updated:# (use "git add <file>..." to update what will be committed)## modified: app.yaml# modified: main.py#

$ git status

Page 180: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

# On branch master# Changes to be committed:# (use "git reset HEAD <file>..." to unstage)## modified: main.py## Changed but not updated:# (use "git add <file>..." to update what will be committed)## modified: app.yaml# modified: main.py#

$ git status

Page 181: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

# On branch master# Changes to be committed:# (use "git reset HEAD <file>..." to unstage)## modified: main.py## Changed but not updated:# (use "git add <file>..." to update what will be committed)## modified: app.yaml# modified: main.py#

$ git status

Staged

Page 182: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

# On branch master# Changes to be committed:# (use "git reset HEAD <file>..." to unstage)## modified: main.py## Changed but not updated:# (use "git add <file>..." to update what will be committed)## modified: app.yaml# modified: main.py#

$ git status

Unstaged

Page 183: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

# On branch master# Changes to be committed:# (use "git reset HEAD <file>..." to unstage)## modified: main.py## Changed but not updated:# (use "git add <file>..." to update what will be committed)## modified: app.yaml# modified: main.py#

$ git status

Page 184: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

#!/usr/bin/env pythonimport wsgiref.handlersfrom google.appengine.ext import webapp

# this program prints out ‘hello world’

class MainHandler(webapp.RequestHandler):

def get(self): self.response.out.write('Hola Mundo!')

def main(): application = webapp.WSGIApplication([('/' debug=True) wsgiref.handlers.CGIHandler().run(applicat

if __name__ == '__main__': main()

#!/usr/bin/env pythonimport wsgiref.handlersfrom google.appengine.ext import webapp

# this program prints out ‘hello world’

class MainHandler(webapp.RequestHandler):

def get(self): self.response.out.write('Hello World!')

def main(): application = webapp.WSGIApplication([('/' debug=True) wsgiref.handlers.CGIHandler().run(applicat

if __name__ == '__main__': main()

Staged In Working Directory

Page 185: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

#!/usr/bin/env pythonimport wsgiref.handlersfrom google.appengine.ext import webapp

# this program prints out ‘hello world’

class MainHandler(webapp.RequestHandler):

def get(self): self.response.out.write('Hola Mundo!')

def main(): application = webapp.WSGIApplication([('/' debug=True) wsgiref.handlers.CGIHandler().run(applicat

if __name__ == '__main__': main()

#!/usr/bin/env pythonimport wsgiref.handlersfrom google.appengine.ext import webapp

# this program prints out ‘hello world’

class MainHandler(webapp.RequestHandler):

def get(self): self.response.out.write('Hello World!')

def main(): application = webapp.WSGIApplication([('/' debug=True) wsgiref.handlers.CGIHandler().run(applicat

if __name__ == '__main__': main()

Staged In Working Directory

Page 186: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

You have to stage a file after you edit it

Page 187: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

You have to stage a file after you edit it

Page 188: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

You have to stage a file after you edit it

Page 189: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

$ git status# On branch master# Changes to be committed:# (use "git reset HEAD <file>..." to unstage)## modified: app.yaml# modified: main.py#

$ git add app.yaml main.py

Page 190: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

$ git status# On branch master# Changes to be committed:# (use "git reset HEAD <file>..." to unstage)## modified: app.yaml# modified: main.py#

$ git add app.yaml main.py

Page 191: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

$ git status# On branch master# Changes to be committed:# (use "git reset HEAD <file>..." to unstage)## modified: app.yaml# modified: main.py#

$ git add app.yaml main.py

Page 192: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

interesting tidbit

Page 193: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

git add -p

Page 194: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

A Basic Workflow

Edit files

Stage the changes

Review your changes

Commit the changes

Page 195: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

git commit

Page 196: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

working directory

repository

index

git add

git commit

Page 197: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

working directory

repository

index

git add

git commit

Page 198: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

$ git commit

# Please enter the commit message for your changes. Lines starting# with '#' will be ignored, and an empty message aborts the commit.# On branch master# Changes to be committed:# (use "git reset HEAD <file>..." to unstage)## modified: app.yaml# modified: main.py#~ ~ ~ ~ ".git/COMMIT_EDITMSG" 10L, 279C

Page 199: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

$ git commit

# Please enter the commit message for your changes. Lines starting# with '#' will be ignored, and an empty message aborts the commit.# On branch master# Changes to be committed:# (use "git reset HEAD <file>..." to unstage)## modified: app.yaml# modified: main.py#~ ~ ~ ~ ".git/COMMIT_EDITMSG" 10L, 279C

Page 200: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

$ git commit

# Please enter the commit message for your changes. Lines starting# with '#' will be ignored, and an empty message aborts the commit.# On branch master# Changes to be committed:# (use "git reset HEAD <file>..." to unstage)## modified: app.yaml# modified: main.py#~ ~ ~ ~ ".git/COMMIT_EDITMSG" 10L, 279C

Page 201: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

descriptive commit message# Please enter the commit message for your changes. Lines starting# with '#' will be ignored, and an empty message aborts the commit.# On branch master# Changes to be committed:# (use "git reset HEAD <file>..." to unstage)## modified: app.yaml# modified: main.py#~ ~ ~ ~ ".git/COMMIT_EDITMSG" 10L, 279C

$ git commit

Page 202: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

$ git commitCreated commit 77d3001: descriptive commit message 2 files changed, 4 insertions(+), 2 deletions(-)

Page 203: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

A Basic Workflow

Edit files

Stage the changes

Review your changes

Commit the changes

vim / emacs / etc

git add (file)

repo status

git commit

Page 204: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

A Basic Workflow

Edit files

Stage the changes

Review your changes

Commit the changes

vim / emacs / etc

git add (file)

repo status

git commit

Page 205: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

A Basic Workflow

Edit files

Stage the changes

Review your changes

Commit the changes

vim / emacs / etc

git add (file)

repo status

git commit

Page 206: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

A Basic Workflow

Edit files

Stage the changes

Review your changes

Commit the changes

vim / emacs / etc

git add (file)

git status

git commit

Page 207: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

A Basic Workflow

Edit files

Stage the changes

Review your changes

Commit the changes

vim / emacs / etc

git add (file)

git status

git commit

Page 208: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

cheating...

Page 209: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

A Basicerer Workflow

Edit files

Commit the changes

vim / emacs / etc

git commit

Page 210: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

A Basicerer Workflow

Edit files

Stage & commit the changes

vim / emacs / etc

git commit -a

Page 211: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

A Basicerer Workflow

Edit files

Stage & commit the changes

vim / emacs / etc

git commit -a

Page 212: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

What’s going on here?

Page 213: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

$ git commitCreated commit 77d3001: descriptive commit message 2 files changed, 4 insertions(+), 2 deletions(-)

Page 214: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

$ git commitCreated commit 77d3001: descriptive commit message 2 files changed, 4 insertions(+), 2 deletions(-)

Page 215: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

77d3001

Page 216: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

77d3001

Page 217: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

77d3001a1de6bf8f5e431972fe4d25b01e595c0b

Page 218: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

77d3001a1de6bf8f5e431972fe4d25b01e595c0b

Page 219: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

77d3001a1de6bf8f5e431972fe4d25b01e595c0b

Page 220: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

77d3001a1de6bf8f5e431972fe4d25b01e595c0b

commit size

ae668..

tree

parent

author

committermy commit message goes hereand it is really, really cool

c4ec5

a149eScott

Scott

Page 221: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

77d3001a1de6bf8f5e431972fe4d25b01e595c0b

commit size

ae668..

tree

parent

author

committermy commit message goes hereand it is really, really cool

c4ec5

a149eScott

Scott

tree c4ec543b0322744e55c5efc9b6c4e449d398dbffparent a149e2160b3f7573768cdc2fce24d0881f3577e1author Scott Chacon <[email protected]> 1223402504 -0700committer Scott Chacon <[email protected]> 1223402504 -0700

descriptive commit message

Page 222: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

77d3001a1de6bf8f5e431972fe4d25b01e595c0b

commit size

ae668..

tree

parent

author

committermy commit message goes hereand it is really, really cool

c4ec5

a149eScott

Scott

Page 223: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

77d3001a1de6bf8f5e431972fe4d25b01e595c0b

commit size

ae668..

tree

parent

author

committermy commit message goes hereand it is really, really cool

c4ec5

a149eScott

Scott

app.yaml

index.yaml

main.py

./ c4e

03e

1d3

3d5

Page 224: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

commit size

ae668..

tree

parent

author

committermy commit message goes hereand it is really, really cool

c4ec5

a149eScott

Scott

app.yaml

index.yaml

main.py

./ c4e

03e

1d3

3d5

commit size

tree

parent

author

committerthis is the previous commitand I am very proud of it

2de54

38defScott

Scott

Page 225: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

commit size

ae668..

tree

parent

author

committermy commit message goes hereand it is really, really cool

c4ec5

a149eScott

Scott

app.yaml

index.yaml

main.py

./ c4e

03e

1d3

3d5

commit size

tree

parent

author

committerthis is the previous commitand I am very proud of it

2de54

38defScott

Scott

app.yaml

index.yaml

main.py

./ c4e

03e

1d3

3d5

Page 226: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

commit size

ae668..

tree

parent

author

committermy commit message goes hereand it is really, really cool

c4ec5

a149eScott

Scott

app.yaml

index.yaml

main.py

./ c4e

03e

1d3

3d5

commit size

tree

parent

author

committerthis is the previous commitand I am very proud of it

2de54

38defScott

Scott

commit size

tree

parent

author

committerthis is the commit before thatand I'm not sure why

2fe65

90ecdScott

Scott

app.yaml

index.yaml

main.py

./ c4e

03e

1d3

3d5

app.yaml

index.yaml

main.py

./ c4e

03e

1d3

3d5

commit size

tree

parent

author

committerthis is the commit before thatand I'm not sure why

2fe65

90ecdScott

Scott

app.yaml

index.yaml

main.py

./ c4e

03e

1d3

3d5

Page 227: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

commit size

tree

parent

author

committerthis is the commit before thatand I'm not sure why

2fe65

90ecdScott

Scott

app.yaml

index.yaml

main.py

./ c4e

03e

1d3

3d5

commit size

tree

parent

author

committerthis is the commit before thatand I'm not sure why

2fe65

90ecdScott

Scott

app.yaml

index.yaml

main.py

./ c4e

03e

1d3

3d5

commit size

ae668..

tree

parent

author

committermy commit message goes hereand it is really, really cool

c4ec5

a149eScott

Scott

app.yaml

index.yaml

main.py

./ c4e

03e

1d3

3d5

commit size

tree

parent

author

committerthis is the previous commitand I am very proud of it

2de54

38defScott

Scott

commit size

tree

parent

author

committerthis is the commit before thatand I'm not sure why

2fe65

90ecdScott

Scott

app.yaml

index.yaml

main.py

./ c4e

03e

1d3

3d5

app.yaml

index.yaml

main.py

./ c4e

03e

1d3

3d5

commit size

tree

parent

author

committerthis is the commit before thatand I'm not sure why

2fe65

90ecdScott

Scott

app.yaml

index.yaml

main.py

./ c4e

03e

1d3

3d5

Page 228: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

commit size

ae668..

tree

parent

author

committermy commit message goes hereand it is really, really cool

c4ec5

a149eScott

Scott

app.yaml

index.yaml

main.py

./ c4e

03e

1d3

3d5

commit size

tree

parent

author

committerthis is the previous commitand I am very proud of it

2de54

38defScott

Scott

commit size

tree

parent

author

committerthis is the commit before thatand I'm not sure why

2fe65

90ecdScott

Scott

app.yaml

index.yaml

main.py

./ c4e

03e

1d3

3d5

app.yaml

index.yaml

main.py

./ c4e

03e

1d3

3d5

commit size

tree

parent

author

committerthis is the commit before thatand I'm not sure why

2fe65

90ecdScott

Scott

app.yaml

index.yaml

main.py

./ c4e

03e

1d3

3d5

commit size

tree

parent

author

committerthis is the commit before thatand I'm not sure why

2fe65

90ecdScott

Scott

app.yaml

index.yaml

main.py

./ c4e

03e

1d3

3d5

commit size

tree

parent

author

committerthis is the commit before thatand I'm not sure why

2fe65

90ecdScott

Scott

app.yaml

index.yaml

main.py

./ c4e

03e

1d3

3d5

48e 77da1438d

c4e

3d5

1d3

03e

f46

23f

30e

67e

32a

5b1

Page 229: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

commit size

ae668..

tree

parent

author

committermy commit message goes hereand it is really, really cool

c4ec5

a149eScott

Scott

app.yaml

index.yaml

main.py

./ c4e

03e

1d3

3d5

commit size

tree

parent

author

committerthis is the previous commitand I am very proud of it

2de54

38defScott

Scott

commit size

tree

parent

author

committerthis is the commit before thatand I'm not sure why

2fe65

90ecdScott

Scott

app.yaml

index.yaml

main.py

./ c4e

03e

1d3

3d5

app.yaml

index.yaml

main.py

./ c4e

03e

1d3

3d5

commit size

tree

parent

author

committerthis is the commit before thatand I'm not sure why

2fe65

90ecdScott

Scott

app.yaml

index.yaml

main.py

./ c4e

03e

1d3

3d5

commit size

tree

parent

author

committerthis is the commit before thatand I'm not sure why

2fe65

90ecdScott

Scott

app.yaml

index.yaml

main.py

./ c4e

03e

1d3

3d5

commit size

tree

parent

author

committerthis is the commit before thatand I'm not sure why

2fe65

90ecdScott

Scott

app.yaml

index.yaml

main.py

./ c4e

03e

1d3

3d5

48e

77d

a14

38d

c4e

3d51d3

03e

f46

23f 30e

67e

32a

5b1

Page 230: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

Repository

3d4

03e

ae6

5b1

1d3

c36

f46

23f

6fe

30e

67e

32a

ffe

38d

5b1

1d3

254

a14

d23

2d3

48e

735

de3

c4ec4e

77d

3d5

Page 231: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

Repository

3d4

03e

ae6

5b1

1d3

c36

f46

23f

6fe

30e

67e

32a

ffe

38d

5b1

1d3

254

a14

d23

2d3

48e

735

de3

c4ec4e

77d

3d5

git checkout ae635

Page 232: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

Repository

3d4

03e

ae6

5b1

1d3

c36

f46

23f

6fe

30e

67e

32a

ffe

38d

5b1

1d3

254

a14

d23

2d3

48e

735

de3

c4ec4e

77d

3d5

git checkout ae635

Page 233: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

Working DirectoryIndex

Rakefile

README

simplegit.rb

./

lib/

./Rakefile

./README

./lib/simplegit.rb

./

./lib/ c36

3d4

03e

5b1

1d3

Repository

3d4

03e

ae6

5b1

1d3

c36

f46

23f

6fe

30e

67e

32a

ffe

38d

5b1

1d3

254

a14

d23

2d3

48e

735

de3

c4ec4e

77d

3d5

Page 234: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

Repository

3d4

03e

ae6

5b1

1d3

c36

f46

23f

6fe

30e

67e

32a

ffe

38d

5b1

1d3

254

a14

d23

2d3

48e

735

de3

c4ec4e

77d

3d5

Working DirectoryIndex

Rakefile

README

simplegit.rb

./

lib/

./Rakefile

./README

./lib/simplegit.rb

./

./lib/ c36

3d4

03e

5b1

1d3

Page 235: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

Repository

3d4

03e

ae6

5b1

1d3

c36

f46

23f

6fe

30e

67e

32a

ffe

38d

5b1

1d3

254

a14

d23

2d3

48e

735

de3

c4ec4e

77d

3d5

Working DirectoryIndex

Rakefile

README

simplegit.rb

./

lib/

./Rakefile

./README

./lib/simplegit.rb

./

./lib/ c36

3d4

03e

5b1

1d3

Page 236: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

Repository

3d4

03e

ae6

5b1

1d3

c36

f46

23f

6fe

30e

67e

32a

ffe

38d

5b1

1d3

254

a14

d23

2d3

48e

735

de3

c4ec4e

77d

3d5

Working DirectoryIndex

Rakefile

README

simplegit.rb

./

lib/

./Rakefile

./README

./lib/simplegit.rb

./

./lib/ c36

3d4

03e

5b1

1d3

Page 237: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

Repository

3d4

03e

ae6

5b1

1d3

c36

f46

23f

6fe

30e

67e

32a

ffe

38d

5b1

1d3

254

a14

d23

2d3

48e

735

de3

c4ec4e

77d

3d5

Working DirectoryIndex

Rakefile

README

simplegit.rb

./

lib/

./Rakefile

./README

./lib/simplegit.rb

./

./lib/ c36

3d4

03e

5b1

1d3

git add

Page 238: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

Repository

3d4

03e

ae6

5b1

1d3

c36

f46

23f

6fe

30e

67e

32a

ffe

38d

5b1

1d3

254

a14

d23

2d3

48e

735

de3

c4ec4e

77d

3d5

Working DirectoryIndex

Rakefile

README

simplegit.rb

./

lib/

./Rakefile

./README

./lib/simplegit.rb

./

./lib/ c36

3d4

03e

5b1

1d3

git add

34f

Page 239: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

Repository

3d4

03e

ae6

5b1

1d3

c36

f46

23f

6fe

30e

67e

32a

ffe

38d

5b1

1d3

254

a14

d23

2d3

48e

735

de3

c4ec4e

77d

3d5

Working DirectoryIndex

Rakefile

README

simplegit.rb

./

lib/

./Rakefile

./README

./lib/simplegit.rb

./

./lib/ c36

3d4

03e

5b1

1d3

git commit

34f

a083da34f

ae9

Page 240: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

Repository

3d4

03e

ae6

5b1

1d3

c36

f46

23f

6fe

30e

67e

32a

ffe

38d

5b1

1d3

254

a14

d23

2d3

48e

735

de3

c4ec4e

77d

3d5

Working DirectoryIndex

Rakefile

README

simplegit.rb

./

lib/

./Rakefile

./README

./lib/simplegit.rb

./

./lib/ c36

3d4

03e

5b1

1d334f

a083da34f

ae9

Page 241: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

Repository

3d4

03e

ae6

5b1

1d3

c36

f46

23f

6fe

30e

67e

32a

ffe

38d

5b1

1d3

254

a14

d23

2d3

48e

735

de3

c4ec4e

77d

3d5

Working DirectoryIndex

Rakefile

README

simplegit.rb

./

lib/

./Rakefile

./README

./lib/simplegit.rb

./

./lib/ c36

3d4

03e

5b1

1d334f

a083da34f

ae9

Page 242: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

object model

blob

commit

tree

C1}

Page 243: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

Branching and Merging

Page 244: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

object model

blob

commit

tree

C1}directory list

file contents

pointer to a snapshot

Page 245: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

object model

blob

commit

tree

C1}directory list

file contents

pointer to a snapshot

Page 246: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

branches

Page 247: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

brancheslightweight, movablepointers to a commit

C1

branch

Page 248: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

branching

Page 249: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

git branch

Page 250: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

git checkout

Page 251: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

C1

master

C0

C2 C3

experiment

HEAD

default

Page 252: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

C1

master

C0

C2 C3

experimentC1

master

C0

C2 C3

C4

experiment

C5

T1

git branch experiment

HEAD

default

Page 253: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

C1

master

C0

C2 C3

experimentC1

master

C0

C2 C3

C4

experiment

C5

T1

git branch experiment

HEAD

default

Page 254: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

C1

master

C0

C2 C3

experimentC1

master

C0

C2 C3

C4

experiment

C5

T1

HEAD

$ git branch* default experiment

default

Page 255: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

C1

master

C0

C2 C3

experimentC1

master

C0

C2 C3

C4

experiment

C5

T1

HEAD

$ git branch* default experiment

default

Page 256: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

C1

master

C0

C2 C3

experimentC1

master

C0

C2 C3

C4

experiment

C5

T1

git checkout experiment

HEAD

default

Page 257: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

C1

master

C0

C2 C3

experiment

C1

master

C0

C2 C3

C4

experiment

C5

T1

git commit

HEAD

default

Page 258: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

C1

master

C0

C2 C3

experiment

C1

master

C0

C2 C3

C4

experiment

C5

T1

git commit

HEAD

default

Page 259: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

C1

master

C0

C2 C3

experiment

C1

master

C0

C2 C3

C4

experiment

C5

T1

git commit

HEAD

default

Page 260: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

C1

master

C0

C2 C3

experiment

C1

master

C0

C2 C3

C4

experiment

C5

T1

git commitgit commit

HEAD

default

Page 261: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

C1

master

C0

C2 C3

experiment

C1

master

C0

C2 C3

C4

experiment

C5

T1

HEAD

git checkout defaultdefault

Page 262: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

C1

master

C0

C2 C3

experiment

C1

master

C0

C2 C3

C4

experiment

C5

T1

HEAD

git checkout defaultdefault

Page 263: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

C1

master

C0

C2 C3

C4

experiment

C5

T1

C1

master

C0

C2 C3

C4

experiment

C5

T1git commit

HEAD

default

Page 264: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

C1

master

C0

C2 C3

C4

experiment

C5

T1

C1

master

C0

C2 C3

C4

experiment

C5

T1git commit

HEAD

default

Page 265: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

C1

master

C0

C2 C3

C4

experiment

C5

T1

C1

master

C0

C2 C3

C4

experiment

C5

T1git commit

HEAD

default

Page 266: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

C1

master

C0

C2 C3

C4

experiment

C5

T1

git checkout experimentgit commit

HEAD

default

Page 267: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

merging

Page 268: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

git merge

Page 269: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

C1

master

C0

C2 C3

C4

experiment

C5

T1

HEAD

default

Page 270: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

C1

master

C0

C2 C3

C4

experiment

C5

T1

HEAD

git checkout default

default

Page 271: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

C1C0

C2 C3

C4

experiment

C5

C6

masterT1

git checkout defaultgit merge experiment

HEAD

default

Page 272: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

C1C0

C2 C3

C4

experiment

C5

C6

masterT1

git checkout defaultgit merge experiment

HEAD

default

Page 273: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

C1C0

C2 C3

C4

C5

C6

C7

C8

default

experiment

HEADgit checkout experiment

Page 274: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

C1C0

C2 C3

C4

C5

C6

C7

C8

default

experiment

HEADgit commit

Page 275: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

C1C0

C2 C3

C4

C5

C6

C7

C8

default

experiment

HEAD

git checkout default

Page 276: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

C1C0

C2 C3

C4

C5

C6

C7

C8

default

experiment

HEAD

git merge experiment

Page 277: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

Hot 3 Way Merge

Action

Page 278: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

C1

master

C0

C2 C3

C4

experiment

C5

Page 279: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

C1

master

C0

C2 C3

C4

experiment

C5

Page 280: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

C1C0

C2 C3

C4

C5

C6

C7

Page 281: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

C1C0

C2 C3

C4

C5

C6

C7

Page 282: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

C1C0

C2 C3

C4

C5

C6

C7

Page 283: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

</git-crash-course>

Page 284: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

Lesser Known Git Tricks

Page 285: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

Lesser Known Git TricksRevision Selection

Page 286: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

Lesser Known Git TricksRevision Selection

Log Formatting and Subsets

Page 287: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

Lesser Known Git TricksRevision Selection

Log Formatting and Subsets

Revision Diffs

Page 288: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

Lesser Known Git TricksRevision Selection

Log Formatting and Subsets

Revision Diffs

Annotation

Page 289: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

Lesser Known Git TricksRevision Selection

Log Formatting and Subsets

Revision Diffs

Annotation

Rewriting History

Page 290: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

Lesser Known Git TricksRevision Selection

Log Formatting and Subsets

Revision Diffs

Annotation

Rewriting History

Cherry Picking

Page 291: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

Lesser Known Git TricksRevision Selection

Log Formatting and Subsets

Revision Diffs

Annotation

Rewriting History

Cherry Picking

Undoing

Page 292: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

Lesser Known Git TricksRevision Selection

Log Formatting and Subsets

Revision Diffs

Annotation

Rewriting History

Cherry Picking

Undoing

Bisecting

Page 293: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

Revision Selection

Page 294: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

Revision Selection

alternate ways to refer to objects or ranges of objects

Page 295: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

Revision Selectionfull sha-1

partial sha-1

branch or tag name

caret parent

tilde spec

blob spec

relative specs

ranges

Page 296: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

Full SHA1

6e453f523fa1da50ecb04431101112b3611c6a4d

Page 297: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

Partial SHA16e453f523fa1da50ecb04431101112b3611c6a4d

6e453f523fa1da50

6e453

Page 298: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

Branch, Remote or Tag Name

v1.0

default

m/cupcake

Page 299: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

Caret Parent

default^2

2nd parent of ‘default’

Page 300: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

ce0e4

master

5ec47 2f45e 4eadf 2fbb3 18cae

b3be1 a09c6 df2fa c36ae

jess/master

Page 301: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

ce0e4

master

5ec47 2f45e 4eadf 2fbb3 18cae

b3be1 a09c6 df2fa c36ae

jess/master

master^

Page 302: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

ce0e4

master

5ec47 2f45e 4eadf 2fbb3 18cae

b3be1 a09c6 df2fa c36ae

jess/master

master^2

Page 303: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

Tilde Spec

default~2

grandparent of ‘default’(parent of the parent)

Page 304: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

ce0e4

master

5ec47 2f45e 4eadf 2fbb3 18cae

b3be1 a09c6 df2fa c36ae

jess/master

master~2

Page 305: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

ce0e4

master

5ec47 2f45e 4eadf 2fbb3 18cae

b3be1 a09c6 df2fa c36ae

jess/master

master^^^2master~2^2

Page 306: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

ce0e4

master

5ec47 2f45e 4eadf 2fbb3 18cae

b3be1 a09c6 df2fa c36ae

jess/master

master^^^2master~2^2

Page 307: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

ce0e4

master

5ec47 2f45e 4eadf 2fbb3 18cae

b3be1 a09c6 df2fa c36ae

jess/master

master^^^2master~2^2

Page 308: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

Blob Spec

default:path/to/file

blob of that file in ‘default’ commit

Page 309: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

Relative Specs

master@{yesterday}

the commit ‘master’ was at yesterday

Page 310: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

Relative Specs

master@{5}

the 5th prior value of ‘master’ (locally)

Page 311: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

Ranges

ce0e4..e4272

every commit reachable by e4272 that is not reachable by ce034

Page 312: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

Ranges

[old]..[new]

every commit reachable by [new] that is not reachable by [old]

Page 313: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

Ranges

ce0e4..

everything since a commit

Page 314: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

ce0e4

master

5ec47 2f45e 4eadf 2fbb3 18cae

b3be1 a09c6 df2fa c36ae

jess/master

jess/master..master

Page 315: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

ce0e4

master

5ec47 2f45e 4eadf 2fbb3 18cae

b3be1 a09c6 df2fa c36ae

jess/master

jess/master..master

Page 316: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

jess/master..master

ce0e4

master

5ec47 2f45e 4eadf 2fbb3 18cae

b3be1 a09c6 df2fa c36ae

jess/master

Page 317: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

ce0e4

master

5ec47 2f45e 4eadf 2fbb3 18cae

b3be1 a09c6 df2fa c36ae

jess/master

jess/master..master

Page 318: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

ce0e4

master

5ec47 2f45e 4eadf 2fbb3 18cae

b3be1 a09c6 df2fa c36ae

jess/master

jess/master..c36ae

Page 319: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

ce0e4

master

5ec47 2f45e 4eadf 2fbb3 18cae

b3be1 a09c6 df2fa c36ae

jess/master

jess/master..c36ae

Page 320: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

ce0e4

master

5ec47 2f45e 4eadf 2fbb3 18cae

b3be1 a09c6 df2fa c36ae

jess/master

jess/master..c36ae

Page 321: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

ce0e4

master

5ec47 2f45e 4eadf 2fbb3 18cae

b3be1 a09c6 df2fa c36ae

jess/master

jess/master..c36ae

Page 322: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

Advanced Log

Page 323: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

Log Subsets

Page 324: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

git log m/cupcake..

Page 325: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

C1

C0

m/cupcake default HEAD

Page 326: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

C1

C0

C2

C3

default C4

m/cupcake

HEAD

Page 327: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

C1

C0

C2

C3

default C4

m/cupcake

HEAD

git log m/cupcake..

Page 328: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

C1

C0

C2

C3

default C4

m/cupcake

HEAD

git log m/cupcake..HEAD

Page 329: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

C1

C0

C2

C3

default C4

m/cupcake

HEAD

git log m/cupcake..HEAD

Page 330: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

C1

C0

C2

C3

default C4

m/cupcake

HEAD

git log m/cupcake..HEAD

Page 331: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

C1

C0

C2

C3

default C4

m/cupcake

HEAD

git log m/cupcake..HEAD

Page 332: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

commit 72d404debaa804fca82fd9cf710fbde48c7305c6Author: Shawn O. Pearce <[email protected]>Date: Sun Oct 12 13:13:59 2008 -0700

test-lib: fix broken printf b8eecafd888d219633f4c29e8b6a90fc21a46dfd introduced usage of printf without a format string. Signed-off-by: Shawn O. Pearce <[email protected]>

commit 969c877506cf8cc760c7b251fef6c5b6850bfc19Author: Jeff King <[email protected]>Date: Sun Oct 12 00:06:11 2008 -0400

git apply --directory broken for new files We carefully verify that the input to git-apply is sane, including cross-checking that the filenames we see in "+++" headers match what was provided on the command line of "diff --git". When --directory is used, however, we ended up comparing the unadorned name to one with the prepended root, causing us to complain about a mismatch. We simply need to prepend the root directory, if any, when pulling the name out of the git header. commit ff74126c03a8dfd04e7533573a5c420f2a7112acAuthor: Johannes Schindelin <[email protected]>Date: Fri Oct 10 13:42:12 2008 +0200

rebase -i: do not fail when there is no commit to cherry-pick

Page 333: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

commit 72d404debaa804fca82fd9cf710fbde48c7305c6Author: Shawn O. Pearce <[email protected]>Date: Sun Oct 12 13:13:59 2008 -0700

test-lib: fix broken printf b8eecafd888d219633f4c29e8b6a90fc21a46dfd introduced usage of printf without a format string. Signed-off-by: Shawn O. Pearce <[email protected]>

commit 969c877506cf8cc760c7b251fef6c5b6850bfc19Author: Jeff King <[email protected]>Date: Sun Oct 12 00:06:11 2008 -0400

git apply --directory broken for new files We carefully verify that the input to git-apply is sane, including cross-checking that the filenames we see in "+++" headers match what was provided on the command line of "diff --git". When --directory is used, however, we ended up comparing the unadorned name to one with the prepended root, causing us to complain about a mismatch. We simply need to prepend the root directory, if any, when pulling the name out of the git header. commit ff74126c03a8dfd04e7533573a5c420f2a7112acAuthor: Johannes Schindelin <[email protected]>Date: Fri Oct 10 13:42:12 2008 +0200

rebase -i: do not fail when there is no commit to cherry-pick

C2

C3

C4

Page 334: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files
Page 335: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

git log m/cupcake..

Page 336: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

git log m/cupcake..

git log m/cupcake..HEAD

Page 337: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

git log m/cupcake..

git log m/cupcake..HEAD

git log HEAD ^m/cupcake

Page 338: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

git log m/cupcake..

git log m/cupcake..HEAD

git log HEAD ^m/cupcake

git log 35ae2 ^9fe42

Page 339: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

git log 3e45a ^573eb

Page 340: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

git log 3e45a ^573eb

Page 341: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

git log 08cb1 ca374 ^c0bf9

Page 342: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

C1

C0

C2

C6

C7

C3

C4

C8

C9

C5

m/cupcake default

experiment

m/cupcake

git log c5 c7 ^c9

Page 343: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

C1

C0

C2

C6

C7

C3

C4

C8

C9

C5

m/cupcake default

experiment

m/cupcakem/cupcake

default

git log c5 c7 ^c9

Page 344: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

C1

C0

C2

C6

C7

C3

C4

C8

C9

C5

m/cupcake default

experiment

m/cupcakem/cupcake

default

git log c5 c7 ^c9

Page 345: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

C1

C0

C2

C6

C7

C3

C4

C8

C9

C5

m/cupcake default

experiment

m/cupcakem/cupcake

git log c5 c7 ^c9

Page 346: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

C1

C0

C2

C6

C7

C3

C4

C8

C9

C5

m/cupcake default

experiment

git log c5 c7 ^c9

Page 347: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

which changes aren’t in experiment?

Page 348: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

C1

C0

C2

C6

C7

C3

C4

C8

C9

C5

m/cupcake default

experiment

git log m/cupcake default ^experiment

Page 349: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

C1

C0

C2

C6

C7

C3

C4

C8

C9

C5

m/cupcake default

experiment

git log m/cupcake default ^experiment

Page 350: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

C1

C0

C2

C6

C7

C3

C4

C8

C9

C5

m/cupcake default

experiment

git log m/cupcake default ^experiment

Page 351: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

C1

C0

C2

C6

C7

C3

C4

C8

C9

C5

m/cupcake default

experiment

git log m/cupcake default ^experiment

Page 352: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

C1

C0

C2

C6

C7

C3

C4

C8

C9

C5

m/cupcake default

experiment

git log m/cupcake default ^experiment

Page 353: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

C1

C0

C2

C6

C7

C3

C4

C8

C9

C5

m/cupcake default

experiment

git log m/cupcake default ^experiment

Page 354: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

C1

C0

C2

C6

C7

C3

C4

C8

C9

C5

m/cupcake default

experiment

git log m/cupcake default ^experiment

Page 355: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

Log Formatting

Page 356: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

git log -p

Page 357: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files
Page 358: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files
Page 359: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files
Page 360: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files
Page 361: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files
Page 362: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

git log -p

Page 363: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

git log --pretty

Page 364: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files
Page 365: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files
Page 366: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files
Page 367: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files
Page 368: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files
Page 369: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files
Page 370: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

git log --graph

Page 371: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

git log --pretty=oneline --graph

Page 372: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

gitk

Page 373: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

gitk 6d13f..41aba

Page 374: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

Revision Diffs

Page 375: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

git diff revA revB

Page 376: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

C1

C0

C2

C6

C7

C3

C4

C8

C9

C5

m/cupcake default

experiment

Page 377: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

C1

C0

C2

C6

C7

C3

C4

C8

C9

C5

m/cupcake default

experiment

git diff c6 c4

Page 378: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

C1

C0

C2

C6

C7

C3

C4

C8

C9

C5

m/cupcake default

experiment

git diff c6 c4

Page 379: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

C1

C0

C2

C6

C7

C3

C4

C8

C9

C5

m/cupcake default

experiment

git diff c6 c4

Page 380: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

C1

C0

C2

C6

C7

C3

C4

C8

C9

C5

m/cupcake default

experiment

git diff c6 c4

Page 381: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

C1

C0

C2

C6

C7

C3

C4

C8

C9

C5

m/cupcake default

experiment

git diff c6 c4this may not be what you want!

Page 382: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

C1

C0

C2

C6

C7

C3

C4

C8

C9

C5

m/cupcake default

experiment

./file1C1

Page 383: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

C2

C1

C0

C2

C6

C7

C3

C4

C8

C9

C5

m/cupcake default

experiment

./file1C1

./file1

./file2

Page 384: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

C2

C1

C0

C2

C6

C7

C3

C4

C8

C9

C5

m/cupcake default

experiment

./file1C1

./file1

./file2C3 ./file1

./file3

Page 385: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

C2

C1

C0

C2

C6

C7

C3

C4

C8

C9

C5

m/cupcake default

experiment

./file1C1

./file1

./file2C3 ./file1

./file3

C4 ./file1./file3./file4

Page 386: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

C2

C1

C0

C2

C6

C7

C3

C4

C8

C9

C5

m/cupcake default

experiment

./file1C1

./file1

./file2C3 ./file1

./file3

C4 ./file1./file3./file4

C6 ./file1./file2./file6

Page 387: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

C2

./file1C1

./file1

./file2C3 ./file1

./file3

C4 ./file1./file3./file4

C6 ./file1./file2./file6

git diff c6 c4

+file3+file4

Page 388: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

C2

./file1C1

./file1

./file2C3 ./file1

./file3

C4 ./file1./file3./file4

C6 ./file1./file2./file6

git diff c6 c4

+file3+file4

Page 389: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

C2

./file1C1

./file1

./file2C3 ./file1

./file3

C4 ./file1./file3./file4

C6 ./file1./file2./file6

git diff c6 c4

+file3+file4-file2-file6

Page 390: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

C2

./file1C1

./file1

./file2C3 ./file1

./file3

C4 ./file1./file3./file4

C6 ./file1./file2./file6

git diff c6 c4

+file3+file4-file2-file6

Page 391: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

C2

./file1C1

./file1

./file2C3 ./file1

./file3

C4 ./file1./file3./file4

C6 ./file1./file2./file6

git diff c6 c4

+file3+file4-file2-file6

Page 392: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

C2

./file1C1

./file1

./file2C3 ./file1

./file3

C4 ./file1./file3./file4

C6 ./file1./file2./file6

git diff c1 c4

+file3+file4

Page 393: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

C2

./file1

./file1

./file2C3 ./file1

./file3

C4./file1./file2./file6

git diff c6...c4

+file3+file4

./file1

./file3

./file4

C6

C1

Page 394: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

Annotation

Page 395: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

git blame

Page 396: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

git blameie: “what dumbass did this? oh, it was me...”

Page 397: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

git blame daemon.c979e32fa (Randal L. Schwartz 2005-10-25 16:29:09 -0700 1) #include "cache.h"85023577 (Junio C Hamano 2006-12-19 14:34:12 -0800 2) #include "pkt-line.h"77cb17e9 (Michal Ostrowski 2006-01-10 21:12:17 -0500 3) #include "exec_cmd.h"49ba83fb (Jon Loeliger 2006-09-19 20:31:51 -0500 4) #include "interpolate.h"f8ff0c06 (Petr Baudis 2005-09-22 11:25:28 +0200 5) 85023577 (Junio C Hamano 2006-12-19 14:34:12 -0800 6) #include <syslog.h>85023577 (Junio C Hamano 2006-12-19 14:34:12 -0800 7) 695dffe2 (Johannes Schindelin 2006-09-28 12:00:35 +0200 8) #ifndef HOST_NAME_MAX695dffe2 (Johannes Schindelin 2006-09-28 12:00:35 +0200 9) #define HOST_NAME_MAX 256695dffe2 (Johannes Schindelin 2006-09-28 12:00:35 +0200 10) #endif695dffe2 (Johannes Schindelin 2006-09-28 12:00:35 +0200 11) 415e7b87 (Patrick Welche 2007-10-18 18:17:39 +0100 12) #ifndef NI_MAXSERV415e7b87 (Patrick Welche 2007-10-18 18:17:39 +0100 13) #define NI_MAXSERV 32415e7b87 (Patrick Welche 2007-10-18 18:17:39 +0100 14) #endif415e7b87 (Patrick Welche 2007-10-18 18:17:39 +0100 15) 9048fe1c (Petr Baudis 2005-09-24 16:13:01 +0200 16) static int log_syslog;f8ff0c06 (Petr Baudis 2005-09-22 11:25:28 +0200 17) static int verbose;1955fabf (Mark Wooding 2006-02-03 20:27:04 +0000 18) static int reuseaddr;f8ff0c06 (Petr Baudis 2005-09-22 11:25:28 +0200 19) 960deccb (H. Peter Anvin 2005-10-19 14:27:01 -0700 20) static const char daemon_usage[] =1b1dd23f (Stephan Beyer 2008-07-13 15:36:15 +0200 21) "git daemon [--verbose] [--syslog] [3bd62c21 (Stephen R. van den Berg 2008-08-14 20:02:20 +0200 22) " [--timeout=n] [--init-ti3bd62c21 (Stephen R. van den Berg 2008-08-14 20:02:20 +0200 23) " [--strict-paths] [--base73a7a656 (Jens Axboe 2007-07-27 14:00:29 -0700 24) " [--user-path | --user-pa49ba83fb (Jon Loeliger 2006-09-19 20:31:51 -0500 25) " [--interpolated-path=pat678dac6b (Tilman Sauerbeck 2006-08-22 19:37:41 +0200 26) " [--reuseaddr] [--detach]d9edcbd6 (Junio C Hamano 2006-09-07 01:40:04 -0700 27) " [--[enable|disable|allowdd467629 (Jon Loeliger 2006-09-26 09:47:43 -0500 28) " [--inetd | [--listen=hosdd467629 (Jon Loeliger 2006-09-26 09:47:43 -0500 29) " [--user=user dd467629 (Jon Loeliger 2006-09-26 09:47:43 -0500 30) " [directory...]";4ae95682 (H. Peter Anvin 2005-09-26 19:10:55 -0700 31) 4ae95682 (H. Peter Anvin 2005-09-26 19:10:55 -0700 32) /* List of acceptable pathname prefi96f1e58f (David Rientjes 2006-08-15 10:23:48 -0700 33) static char **ok_paths;96f1e58f (David Rientjes 2006-08-15 10:23:48 -0700 34) static int strict_paths;4ae95682 (H. Peter Anvin 2005-09-26 19:10:55 -0700 35) 4ae95682 (H. Peter Anvin 2005-09-26 19:10:55 -0700 36) /* If this is set, git-daemon-export96f1e58f (David Rientjes 2006-08-15 10:23:48 -0700 37) static int export_all_trees;

Page 398: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

git blame daemon.c979e32fa (Randal L. Schwartz 2005-10-25 16:29:09 -0700 1) #include "cache.h"85023577 (Junio C Hamano 2006-12-19 14:34:12 -0800 2) #include "pkt-line.h"77cb17e9 (Michal Ostrowski 2006-01-10 21:12:17 -0500 3) #include "exec_cmd.h"49ba83fb (Jon Loeliger 2006-09-19 20:31:51 -0500 4) #include "interpolate.h"f8ff0c06 (Petr Baudis 2005-09-22 11:25:28 +0200 5) 85023577 (Junio C Hamano 2006-12-19 14:34:12 -0800 6) #include <syslog.h>85023577 (Junio C Hamano 2006-12-19 14:34:12 -0800 7) 695dffe2 (Johannes Schindelin 2006-09-28 12:00:35 +0200 8) #ifndef HOST_NAME_MAX695dffe2 (Johannes Schindelin 2006-09-28 12:00:35 +0200 9) #define HOST_NAME_MAX 256695dffe2 (Johannes Schindelin 2006-09-28 12:00:35 +0200 10) #endif695dffe2 (Johannes Schindelin 2006-09-28 12:00:35 +0200 11) 415e7b87 (Patrick Welche 2007-10-18 18:17:39 +0100 12) #ifndef NI_MAXSERV415e7b87 (Patrick Welche 2007-10-18 18:17:39 +0100 13) #define NI_MAXSERV 32415e7b87 (Patrick Welche 2007-10-18 18:17:39 +0100 14) #endif415e7b87 (Patrick Welche 2007-10-18 18:17:39 +0100 15) 9048fe1c (Petr Baudis 2005-09-24 16:13:01 +0200 16) static int log_syslog;f8ff0c06 (Petr Baudis 2005-09-22 11:25:28 +0200 17) static int verbose;1955fabf (Mark Wooding 2006-02-03 20:27:04 +0000 18) static int reuseaddr;f8ff0c06 (Petr Baudis 2005-09-22 11:25:28 +0200 19) 960deccb (H. Peter Anvin 2005-10-19 14:27:01 -0700 20) static const char daemon_usage[] =1b1dd23f (Stephan Beyer 2008-07-13 15:36:15 +0200 21) "git daemon [--verbose] [--syslog] [3bd62c21 (Stephen R. van den Berg 2008-08-14 20:02:20 +0200 22) " [--timeout=n] [--init-ti3bd62c21 (Stephen R. van den Berg 2008-08-14 20:02:20 +0200 23) " [--strict-paths] [--base73a7a656 (Jens Axboe 2007-07-27 14:00:29 -0700 24) " [--user-path | --user-pa49ba83fb (Jon Loeliger 2006-09-19 20:31:51 -0500 25) " [--interpolated-path=pat678dac6b (Tilman Sauerbeck 2006-08-22 19:37:41 +0200 26) " [--reuseaddr] [--detach]d9edcbd6 (Junio C Hamano 2006-09-07 01:40:04 -0700 27) " [--[enable|disable|allowdd467629 (Jon Loeliger 2006-09-26 09:47:43 -0500 28) " [--inetd | [--listen=hosdd467629 (Jon Loeliger 2006-09-26 09:47:43 -0500 29) " [--user=user dd467629 (Jon Loeliger 2006-09-26 09:47:43 -0500 30) " [directory...]";4ae95682 (H. Peter Anvin 2005-09-26 19:10:55 -0700 31) 4ae95682 (H. Peter Anvin 2005-09-26 19:10:55 -0700 32) /* List of acceptable pathname prefi96f1e58f (David Rientjes 2006-08-15 10:23:48 -0700 33) static char **ok_paths;96f1e58f (David Rientjes 2006-08-15 10:23:48 -0700 34) static int strict_paths;4ae95682 (H. Peter Anvin 2005-09-26 19:10:55 -0700 35) 4ae95682 (H. Peter Anvin 2005-09-26 19:10:55 -0700 36) /* If this is set, git-daemon-export96f1e58f (David Rientjes 2006-08-15 10:23:48 -0700 37) static int export_all_trees;

Page 399: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

git blame daemon.c979e32fa (Randal L. Schwartz 2005-10-25 16:29:09 -0700 1) #include "cache.h"85023577 (Junio C Hamano 2006-12-19 14:34:12 -0800 2) #include "pkt-line.h"77cb17e9 (Michal Ostrowski 2006-01-10 21:12:17 -0500 3) #include "exec_cmd.h"49ba83fb (Jon Loeliger 2006-09-19 20:31:51 -0500 4) #include "interpolate.h"f8ff0c06 (Petr Baudis 2005-09-22 11:25:28 +0200 5) 85023577 (Junio C Hamano 2006-12-19 14:34:12 -0800 6) #include <syslog.h>85023577 (Junio C Hamano 2006-12-19 14:34:12 -0800 7) 695dffe2 (Johannes Schindelin 2006-09-28 12:00:35 +0200 8) #ifndef HOST_NAME_MAX695dffe2 (Johannes Schindelin 2006-09-28 12:00:35 +0200 9) #define HOST_NAME_MAX 256695dffe2 (Johannes Schindelin 2006-09-28 12:00:35 +0200 10) #endif695dffe2 (Johannes Schindelin 2006-09-28 12:00:35 +0200 11) 415e7b87 (Patrick Welche 2007-10-18 18:17:39 +0100 12) #ifndef NI_MAXSERV415e7b87 (Patrick Welche 2007-10-18 18:17:39 +0100 13) #define NI_MAXSERV 32415e7b87 (Patrick Welche 2007-10-18 18:17:39 +0100 14) #endif415e7b87 (Patrick Welche 2007-10-18 18:17:39 +0100 15) 9048fe1c (Petr Baudis 2005-09-24 16:13:01 +0200 16) static int log_syslog;f8ff0c06 (Petr Baudis 2005-09-22 11:25:28 +0200 17) static int verbose;1955fabf (Mark Wooding 2006-02-03 20:27:04 +0000 18) static int reuseaddr;f8ff0c06 (Petr Baudis 2005-09-22 11:25:28 +0200 19) 960deccb (H. Peter Anvin 2005-10-19 14:27:01 -0700 20) static const char daemon_usage[] =1b1dd23f (Stephan Beyer 2008-07-13 15:36:15 +0200 21) "git daemon [--verbose] [--syslog] [3bd62c21 (Stephen R. van den Berg 2008-08-14 20:02:20 +0200 22) " [--timeout=n] [--init-ti3bd62c21 (Stephen R. van den Berg 2008-08-14 20:02:20 +0200 23) " [--strict-paths] [--base73a7a656 (Jens Axboe 2007-07-27 14:00:29 -0700 24) " [--user-path | --user-pa49ba83fb (Jon Loeliger 2006-09-19 20:31:51 -0500 25) " [--interpolated-path=pat678dac6b (Tilman Sauerbeck 2006-08-22 19:37:41 +0200 26) " [--reuseaddr] [--detach]d9edcbd6 (Junio C Hamano 2006-09-07 01:40:04 -0700 27) " [--[enable|disable|allowdd467629 (Jon Loeliger 2006-09-26 09:47:43 -0500 28) " [--inetd | [--listen=hosdd467629 (Jon Loeliger 2006-09-26 09:47:43 -0500 29) " [--user=user dd467629 (Jon Loeliger 2006-09-26 09:47:43 -0500 30) " [directory...]";4ae95682 (H. Peter Anvin 2005-09-26 19:10:55 -0700 31) 4ae95682 (H. Peter Anvin 2005-09-26 19:10:55 -0700 32) /* List of acceptable pathname prefi96f1e58f (David Rientjes 2006-08-15 10:23:48 -0700 33) static char **ok_paths;96f1e58f (David Rientjes 2006-08-15 10:23:48 -0700 34) static int strict_paths;4ae95682 (H. Peter Anvin 2005-09-26 19:10:55 -0700 35) 4ae95682 (H. Peter Anvin 2005-09-26 19:10:55 -0700 36) /* If this is set, git-daemon-export96f1e58f (David Rientjes 2006-08-15 10:23:48 -0700 37) static int export_all_trees;

Page 400: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

979e32fa (Randal L. Schwartz 2005-10-25 16:29:09 -0700 1) #include "cache.h"85023577 (Junio C Hamano 2006-12-19 14:34:12 -0800 2) #include "pkt-line.h"77cb17e9 (Michal Ostrowski 2006-01-10 21:12:17 -0500 3) #include "exec_cmd.h"49ba83fb (Jon Loeliger 2006-09-19 20:31:51 -0500 4) #include "interpolate.h"f8ff0c06 (Petr Baudis 2005-09-22 11:25:28 +0200 5) 85023577 (Junio C Hamano 2006-12-19 14:34:12 -0800 6) #include <syslog.h>85023577 (Junio C Hamano 2006-12-19 14:34:12 -0800 7) 695dffe2 (Johannes Schindelin 2006-09-28 12:00:35 +0200 8) #ifndef HOST_NAME_MAX695dffe2 (Johannes Schindelin 2006-09-28 12:00:35 +0200 9) #define HOST_NAME_MAX 256695dffe2 (Johannes Schindelin 2006-09-28 12:00:35 +0200 10) #endif695dffe2 (Johannes Schindelin 2006-09-28 12:00:35 +0200 11) 415e7b87 (Patrick Welche 2007-10-18 18:17:39 +0100 12) #ifndef NI_MAXSERV415e7b87 (Patrick Welche 2007-10-18 18:17:39 +0100 13) #define NI_MAXSERV 32415e7b87 (Patrick Welche 2007-10-18 18:17:39 +0100 14) #endif415e7b87 (Patrick Welche 2007-10-18 18:17:39 +0100 15) 9048fe1c (Petr Baudis 2005-09-24 16:13:01 +0200 16) static int log_syslog;f8ff0c06 (Petr Baudis 2005-09-22 11:25:28 +0200 17) static int verbose;1955fabf (Mark Wooding 2006-02-03 20:27:04 +0000 18) static int reuseaddr;f8ff0c06 (Petr Baudis 2005-09-22 11:25:28 +0200 19) 960deccb (H. Peter Anvin 2005-10-19 14:27:01 -0700 20) static const char daemon_usage[] =1b1dd23f (Stephan Beyer 2008-07-13 15:36:15 +0200 21) "git daemon [--verbose] [--syslog] [3bd62c21 (Stephen R. van den Berg 2008-08-14 20:02:20 +0200 22) " [--timeout=n] [--init-ti3bd62c21 (Stephen R. van den Berg 2008-08-14 20:02:20 +0200 23) " [--strict-paths] [--base73a7a656 (Jens Axboe 2007-07-27 14:00:29 -0700 24) " [--user-path | --user-pa49ba83fb (Jon Loeliger 2006-09-19 20:31:51 -0500 25) " [--interpolated-path=pat678dac6b (Tilman Sauerbeck 2006-08-22 19:37:41 +0200 26) " [--reuseaddr] [--detach]d9edcbd6 (Junio C Hamano 2006-09-07 01:40:04 -0700 27) " [--[enable|disable|allowdd467629 (Jon Loeliger 2006-09-26 09:47:43 -0500 28) " [--inetd | [--listen=hosdd467629 (Jon Loeliger 2006-09-26 09:47:43 -0500 29) " [--user=user dd467629 (Jon Loeliger 2006-09-26 09:47:43 -0500 30) " [directory...]";4ae95682 (H. Peter Anvin 2005-09-26 19:10:55 -0700 31) 4ae95682 (H. Peter Anvin 2005-09-26 19:10:55 -0700 32) /* List of acceptable pathname prefi96f1e58f (David Rientjes 2006-08-15 10:23:48 -0700 33) static char **ok_paths;96f1e58f (David Rientjes 2006-08-15 10:23:48 -0700 34) static int strict_paths;4ae95682 (H. Peter Anvin 2005-09-26 19:10:55 -0700 35) 4ae95682 (H. Peter Anvin 2005-09-26 19:10:55 -0700 36) /* If this is set, git-daemon-export96f1e58f (David Rientjes 2006-08-15 10:23:48 -0700 37) static int export_all_trees;

git blame daemon.c

Page 401: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

979e32fa (Randal L. Schwartz 2005-10-25 16:29:09 -0700 1) #include "cache.h"85023577 (Junio C Hamano 2006-12-19 14:34:12 -0800 2) #include "pkt-line.h"77cb17e9 (Michal Ostrowski 2006-01-10 21:12:17 -0500 3) #include "exec_cmd.h"49ba83fb (Jon Loeliger 2006-09-19 20:31:51 -0500 4) #include "interpolate.h"f8ff0c06 (Petr Baudis 2005-09-22 11:25:28 +0200 5) 85023577 (Junio C Hamano 2006-12-19 14:34:12 -0800 6) #include <syslog.h>85023577 (Junio C Hamano 2006-12-19 14:34:12 -0800 7) 695dffe2 (Johannes Schindelin 2006-09-28 12:00:35 +0200 8) #ifndef HOST_NAME_MAX695dffe2 (Johannes Schindelin 2006-09-28 12:00:35 +0200 9) #define HOST_NAME_MAX 256695dffe2 (Johannes Schindelin 2006-09-28 12:00:35 +0200 10) #endif695dffe2 (Johannes Schindelin 2006-09-28 12:00:35 +0200 11) 415e7b87 (Patrick Welche 2007-10-18 18:17:39 +0100 12) #ifndef NI_MAXSERV415e7b87 (Patrick Welche 2007-10-18 18:17:39 +0100 13) #define NI_MAXSERV 32415e7b87 (Patrick Welche 2007-10-18 18:17:39 +0100 14) #endif415e7b87 (Patrick Welche 2007-10-18 18:17:39 +0100 15) 9048fe1c (Petr Baudis 2005-09-24 16:13:01 +0200 16) static int log_syslog;f8ff0c06 (Petr Baudis 2005-09-22 11:25:28 +0200 17) static int verbose;1955fabf (Mark Wooding 2006-02-03 20:27:04 +0000 18) static int reuseaddr;f8ff0c06 (Petr Baudis 2005-09-22 11:25:28 +0200 19) 960deccb (H. Peter Anvin 2005-10-19 14:27:01 -0700 20) static const char daemon_usage[] =1b1dd23f (Stephan Beyer 2008-07-13 15:36:15 +0200 21) "git daemon [--verbose] [--syslog] [3bd62c21 (Stephen R. van den Berg 2008-08-14 20:02:20 +0200 22) " [--timeout=n] [--init-ti3bd62c21 (Stephen R. van den Berg 2008-08-14 20:02:20 +0200 23) " [--strict-paths] [--base73a7a656 (Jens Axboe 2007-07-27 14:00:29 -0700 24) " [--user-path | --user-pa49ba83fb (Jon Loeliger 2006-09-19 20:31:51 -0500 25) " [--interpolated-path=pat678dac6b (Tilman Sauerbeck 2006-08-22 19:37:41 +0200 26) " [--reuseaddr] [--detach]d9edcbd6 (Junio C Hamano 2006-09-07 01:40:04 -0700 27) " [--[enable|disable|allowdd467629 (Jon Loeliger 2006-09-26 09:47:43 -0500 28) " [--inetd | [--listen=hosdd467629 (Jon Loeliger 2006-09-26 09:47:43 -0500 29) " [--user=user dd467629 (Jon Loeliger 2006-09-26 09:47:43 -0500 30) " [directory...]";4ae95682 (H. Peter Anvin 2005-09-26 19:10:55 -0700 31) 4ae95682 (H. Peter Anvin 2005-09-26 19:10:55 -0700 32) /* List of acceptable pathname prefi96f1e58f (David Rientjes 2006-08-15 10:23:48 -0700 33) static char **ok_paths;96f1e58f (David Rientjes 2006-08-15 10:23:48 -0700 34) static int strict_paths;4ae95682 (H. Peter Anvin 2005-09-26 19:10:55 -0700 35) 4ae95682 (H. Peter Anvin 2005-09-26 19:10:55 -0700 36) /* If this is set, git-daemon-export96f1e58f (David Rientjes 2006-08-15 10:23:48 -0700 37) static int export_all_trees;

git blame daemon.c

Page 402: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

979e32fa (Randal L. Schwartz 2005-10-25 16:29:09 -0700 1) #include "cache.h"85023577 (Junio C Hamano 2006-12-19 14:34:12 -0800 2) #include "pkt-line.h"77cb17e9 (Michal Ostrowski 2006-01-10 21:12:17 -0500 3) #include "exec_cmd.h"49ba83fb (Jon Loeliger 2006-09-19 20:31:51 -0500 4) #include "interpolate.h"f8ff0c06 (Petr Baudis 2005-09-22 11:25:28 +0200 5) 85023577 (Junio C Hamano 2006-12-19 14:34:12 -0800 6) #include <syslog.h>85023577 (Junio C Hamano 2006-12-19 14:34:12 -0800 7) 695dffe2 (Johannes Schindelin 2006-09-28 12:00:35 +0200 8) #ifndef HOST_NAME_MAX695dffe2 (Johannes Schindelin 2006-09-28 12:00:35 +0200 9) #define HOST_NAME_MAX 256695dffe2 (Johannes Schindelin 2006-09-28 12:00:35 +0200 10) #endif695dffe2 (Johannes Schindelin 2006-09-28 12:00:35 +0200 11) 415e7b87 (Patrick Welche 2007-10-18 18:17:39 +0100 12) #ifndef NI_MAXSERV415e7b87 (Patrick Welche 2007-10-18 18:17:39 +0100 13) #define NI_MAXSERV 32415e7b87 (Patrick Welche 2007-10-18 18:17:39 +0100 14) #endif415e7b87 (Patrick Welche 2007-10-18 18:17:39 +0100 15) 9048fe1c (Petr Baudis 2005-09-24 16:13:01 +0200 16) static int log_syslog;f8ff0c06 (Petr Baudis 2005-09-22 11:25:28 +0200 17) static int verbose;1955fabf (Mark Wooding 2006-02-03 20:27:04 +0000 18) static int reuseaddr;f8ff0c06 (Petr Baudis 2005-09-22 11:25:28 +0200 19) 960deccb (H. Peter Anvin 2005-10-19 14:27:01 -0700 20) static const char daemon_usage[] =1b1dd23f (Stephan Beyer 2008-07-13 15:36:15 +0200 21) "git daemon [--verbose] [--syslog] [3bd62c21 (Stephen R. van den Berg 2008-08-14 20:02:20 +0200 22) " [--timeout=n] [--init-ti3bd62c21 (Stephen R. van den Berg 2008-08-14 20:02:20 +0200 23) " [--strict-paths] [--base73a7a656 (Jens Axboe 2007-07-27 14:00:29 -0700 24) " [--user-path | --user-pa49ba83fb (Jon Loeliger 2006-09-19 20:31:51 -0500 25) " [--interpolated-path=pat678dac6b (Tilman Sauerbeck 2006-08-22 19:37:41 +0200 26) " [--reuseaddr] [--detach]d9edcbd6 (Junio C Hamano 2006-09-07 01:40:04 -0700 27) " [--[enable|disable|allowdd467629 (Jon Loeliger 2006-09-26 09:47:43 -0500 28) " [--inetd | [--listen=hosdd467629 (Jon Loeliger 2006-09-26 09:47:43 -0500 29) " [--user=user dd467629 (Jon Loeliger 2006-09-26 09:47:43 -0500 30) " [directory...]";4ae95682 (H. Peter Anvin 2005-09-26 19:10:55 -0700 31) 4ae95682 (H. Peter Anvin 2005-09-26 19:10:55 -0700 32) /* List of acceptable pathname prefi96f1e58f (David Rientjes 2006-08-15 10:23:48 -0700 33) static char **ok_paths;96f1e58f (David Rientjes 2006-08-15 10:23:48 -0700 34) static int strict_paths;4ae95682 (H. Peter Anvin 2005-09-26 19:10:55 -0700 35) 4ae95682 (H. Peter Anvin 2005-09-26 19:10:55 -0700 36) /* If this is set, git-daemon-export96f1e58f (David Rientjes 2006-08-15 10:23:48 -0700 37) static int export_all_trees;

git blame daemon.c

Page 403: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

git blame -C GITPackUpload.m

Page 404: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

git blame -C GITPackUpload.mf344f58d Source/Network/GITServerHandler.m (Scott Chacon 2009-01-04 18:59:04 -0800 12) f344f58d Source/Network/GITServerHandler.m (Scott Chacon 2009-01-04 18:59:04 -0800 13) #define PACK_SIGNf344f58d Source/Network/GITServerHandler.m (Scott Chacon 2009-01-04 18:59:04 -0800 14) #define PACK_VERSf344f58d Source/Network/GITServerHandler.m (Scott Chacon 2009-01-04 18:59:04 -0800 15) ad11ac80 Source/Network/GITPackUpload.m (Scott Chacon 2009-03-24 18:32:50 +0100 16) @implementation Gad11ac80 Source/Network/GITPackUpload.m (Scott Chacon 2009-03-24 18:32:50 +0100 17) ad11ac80 Source/Network/GITPackUpload.m (Scott Chacon 2009-03-24 18:32:50 +0100 18) @synthesize gitRead11ac80 Source/Network/GITPackUpload.m (Scott Chacon 2009-03-24 18:32:50 +0100 19) @synthesize needRad11ac80 Source/Network/GITPackUpload.m (Scott Chacon 2009-03-24 18:32:50 +0100 20) @synthesize gitSoad11ac80 Source/Network/GITPackUpload.m (Scott Chacon 2009-03-24 18:32:50 +0100 21) @synthesize refDiad11ac80 Source/Network/GITPackUpload.m (Scott Chacon 2009-03-24 18:32:50 +0100 22) a2cbabf5 Source/Network/GITPackUpload.m (Scott Chacon 2009-03-25 22:29:39 +0100 23) - (id) initWithGiad11ac80 Source/Network/GITPackUpload.m (Scott Chacon 2009-03-24 18:32:50 +0100 24) {a2cbabf5 Source/Network/GITPackUpload.m (Scott Chacon 2009-03-25 22:29:39 +0100 25) gitRepo = ad11ac80 Source/Network/GITPackUpload.m (Scott Chacon 2009-03-24 18:32:50 +0100 26) needRefs =ad11ac80 Source/Network/GITPackUpload.m (Scott Chacon 2009-03-24 18:32:50 +0100 27) gitSocket ad11ac80 Source/Network/GITPackUpload.m (Scott Chacon 2009-03-24 18:32:50 +0100 28) return selad11ac80 Source/Network/GITPackUpload.m (Scott Chacon 2009-03-24 18:32:50 +0100 29) }ad11ac80 Source/Network/GITPackUpload.m (Scott Chacon 2009-03-24 18:32:50 +0100 30) ad11ac80 Source/Network/GITPackUpload.m (Scott Chacon 2009-03-24 18:32:50 +0100 31) - (bool) uploadPaf344f58d Source/Network/GITServerHandler.m (Scott Chacon 2009-01-04 18:59:04 -0800 32) {f344f58d Source/Network/GITServerHandler.m (Scott Chacon 2009-01-04 18:59:04 -0800 33) NSLog(@"upf344f58d Source/Network/GITServerHandler.m (Scott Chacon 2009-01-04 18:59:04 -0800 34) NSString *f344f58d Source/Network/GITServerHandler.m (Scott Chacon 2009-01-04 18:59:04 -0800 35) NSArray *tf344f58d Source/Network/GITServerHandler.m (Scott Chacon 2009-01-04 18:59:04 -0800 36) 56ef2caf Source/Network/GITServerHandler.m (Scott Chacon 2009-01-05 21:44:26 -0800 37) refDict = f344f58d Source/Network/GITServerHandler.m (Scott Chacon 2009-01-04 18:59:04 -0800 38)

Page 405: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

f344f58d Source/Network/GITServerHandler.m (Scott Chacon 2009-01-04 18:59:04 -0800 12) f344f58d Source/Network/GITServerHandler.m (Scott Chacon 2009-01-04 18:59:04 -0800 13) #define PACK_SIGNf344f58d Source/Network/GITServerHandler.m (Scott Chacon 2009-01-04 18:59:04 -0800 14) #define PACK_VERSf344f58d Source/Network/GITServerHandler.m (Scott Chacon 2009-01-04 18:59:04 -0800 15) ad11ac80 Source/Network/GITPackUpload.m (Scott Chacon 2009-03-24 18:32:50 +0100 16) @implementation Gad11ac80 Source/Network/GITPackUpload.m (Scott Chacon 2009-03-24 18:32:50 +0100 17) ad11ac80 Source/Network/GITPackUpload.m (Scott Chacon 2009-03-24 18:32:50 +0100 18) @synthesize gitRead11ac80 Source/Network/GITPackUpload.m (Scott Chacon 2009-03-24 18:32:50 +0100 19) @synthesize needRad11ac80 Source/Network/GITPackUpload.m (Scott Chacon 2009-03-24 18:32:50 +0100 20) @synthesize gitSoad11ac80 Source/Network/GITPackUpload.m (Scott Chacon 2009-03-24 18:32:50 +0100 21) @synthesize refDiad11ac80 Source/Network/GITPackUpload.m (Scott Chacon 2009-03-24 18:32:50 +0100 22) a2cbabf5 Source/Network/GITPackUpload.m (Scott Chacon 2009-03-25 22:29:39 +0100 23) - (id) initWithGiad11ac80 Source/Network/GITPackUpload.m (Scott Chacon 2009-03-24 18:32:50 +0100 24) {a2cbabf5 Source/Network/GITPackUpload.m (Scott Chacon 2009-03-25 22:29:39 +0100 25) gitRepo = ad11ac80 Source/Network/GITPackUpload.m (Scott Chacon 2009-03-24 18:32:50 +0100 26) needRefs =ad11ac80 Source/Network/GITPackUpload.m (Scott Chacon 2009-03-24 18:32:50 +0100 27) gitSocket ad11ac80 Source/Network/GITPackUpload.m (Scott Chacon 2009-03-24 18:32:50 +0100 28) return selad11ac80 Source/Network/GITPackUpload.m (Scott Chacon 2009-03-24 18:32:50 +0100 29) }ad11ac80 Source/Network/GITPackUpload.m (Scott Chacon 2009-03-24 18:32:50 +0100 30) ad11ac80 Source/Network/GITPackUpload.m (Scott Chacon 2009-03-24 18:32:50 +0100 31) - (bool) uploadPaf344f58d Source/Network/GITServerHandler.m (Scott Chacon 2009-01-04 18:59:04 -0800 32) {f344f58d Source/Network/GITServerHandler.m (Scott Chacon 2009-01-04 18:59:04 -0800 33) NSLog(@"upf344f58d Source/Network/GITServerHandler.m (Scott Chacon 2009-01-04 18:59:04 -0800 34) NSString *f344f58d Source/Network/GITServerHandler.m (Scott Chacon 2009-01-04 18:59:04 -0800 35) NSArray *tf344f58d Source/Network/GITServerHandler.m (Scott Chacon 2009-01-04 18:59:04 -0800 36) 56ef2caf Source/Network/GITServerHandler.m (Scott Chacon 2009-01-05 21:44:26 -0800 37) refDict = f344f58d Source/Network/GITServerHandler.m (Scott Chacon 2009-01-04 18:59:04 -0800 38)

git blame -C GITPackUpload.m

Page 406: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

f344f58d Source/Network/GITServerHandler.m (Scott Chacon 2009-01-04 18:59:04 -0800 12) f344f58d Source/Network/GITServerHandler.m (Scott Chacon 2009-01-04 18:59:04 -0800 13) #define PACK_SIGNf344f58d Source/Network/GITServerHandler.m (Scott Chacon 2009-01-04 18:59:04 -0800 14) #define PACK_VERSf344f58d Source/Network/GITServerHandler.m (Scott Chacon 2009-01-04 18:59:04 -0800 15) ad11ac80 Source/Network/GITPackUpload.m (Scott Chacon 2009-03-24 18:32:50 +0100 16) @implementation Gad11ac80 Source/Network/GITPackUpload.m (Scott Chacon 2009-03-24 18:32:50 +0100 17) ad11ac80 Source/Network/GITPackUpload.m (Scott Chacon 2009-03-24 18:32:50 +0100 18) @synthesize gitRead11ac80 Source/Network/GITPackUpload.m (Scott Chacon 2009-03-24 18:32:50 +0100 19) @synthesize needRad11ac80 Source/Network/GITPackUpload.m (Scott Chacon 2009-03-24 18:32:50 +0100 20) @synthesize gitSoad11ac80 Source/Network/GITPackUpload.m (Scott Chacon 2009-03-24 18:32:50 +0100 21) @synthesize refDiad11ac80 Source/Network/GITPackUpload.m (Scott Chacon 2009-03-24 18:32:50 +0100 22) a2cbabf5 Source/Network/GITPackUpload.m (Scott Chacon 2009-03-25 22:29:39 +0100 23) - (id) initWithGiad11ac80 Source/Network/GITPackUpload.m (Scott Chacon 2009-03-24 18:32:50 +0100 24) {a2cbabf5 Source/Network/GITPackUpload.m (Scott Chacon 2009-03-25 22:29:39 +0100 25) gitRepo = ad11ac80 Source/Network/GITPackUpload.m (Scott Chacon 2009-03-24 18:32:50 +0100 26) needRefs =ad11ac80 Source/Network/GITPackUpload.m (Scott Chacon 2009-03-24 18:32:50 +0100 27) gitSocket ad11ac80 Source/Network/GITPackUpload.m (Scott Chacon 2009-03-24 18:32:50 +0100 28) return selad11ac80 Source/Network/GITPackUpload.m (Scott Chacon 2009-03-24 18:32:50 +0100 29) }ad11ac80 Source/Network/GITPackUpload.m (Scott Chacon 2009-03-24 18:32:50 +0100 30) ad11ac80 Source/Network/GITPackUpload.m (Scott Chacon 2009-03-24 18:32:50 +0100 31) - (bool) uploadPaf344f58d Source/Network/GITServerHandler.m (Scott Chacon 2009-01-04 18:59:04 -0800 32) {f344f58d Source/Network/GITServerHandler.m (Scott Chacon 2009-01-04 18:59:04 -0800 33) NSLog(@"upf344f58d Source/Network/GITServerHandler.m (Scott Chacon 2009-01-04 18:59:04 -0800 34) NSString *f344f58d Source/Network/GITServerHandler.m (Scott Chacon 2009-01-04 18:59:04 -0800 35) NSArray *tf344f58d Source/Network/GITServerHandler.m (Scott Chacon 2009-01-04 18:59:04 -0800 36) 56ef2caf Source/Network/GITServerHandler.m (Scott Chacon 2009-01-05 21:44:26 -0800 37) refDict = f344f58d Source/Network/GITServerHandler.m (Scott Chacon 2009-01-04 18:59:04 -0800 38)

git blame -C GITPackUpload.m

Page 407: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

Rewriting History

Page 408: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

Modifying the last commit

Page 409: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

git commit --amend

Page 410: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

Rebasing

Page 411: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

C1

jess/master

C2

C3

C4

C5

C6master

git merge

Page 412: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

C1

jess/master

C2

C3

C4

C5

C6

git merge

C7master

Page 413: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

C1

jess/master

C2

C3

C4

C5

C6

git merge

C7master

C1

jess/master

C2

C3

C4

C5

C6master

git rebase

Page 414: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

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 415: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

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 416: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

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 417: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

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 418: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

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 419: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

C3'

C4'

C1

jess/master

C2

C3

C4

C5

C6

git merge

C7master

C1

jess/master

C2

C5

C6

master

git rebase

Page 420: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

Fixing a commit several back

Page 421: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

git rebase -igit rebase --interactive

Page 422: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

C1

C0

C2

C3

C4

default

Page 423: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

C1

C0

C2

C3

C4

default

Page 424: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

C1

C0

C2

C3

C4

default

default~2

Page 425: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

C1

C0

C2

C3

C4

default

default~2

Page 426: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

git rebase -i default~2^

Page 427: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

git rebase -i default~2^

Page 428: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

git rebase -i default~2^

Page 429: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

pick 969c877 git apply --directory broken for new filespick b75271d git diff <tree>{3,}: do not reverse order of argspick 72d404d test-lib: fix broken printf

# Rebase f285a2d..5c283eb onto f285a2d## Commands:# p, pick = use commit# e, edit = use commit, but stop for amending# s, squash = use commit, but meld into previous commit## If you remove a line here THAT COMMIT WILL BE LOST.# However, if you remove everything, the rebase will be aborted.#~ ~ ~ ~ ~ "~/projects/git/.git/rebase-merge/git-rebase-todo" 14L, 472C

Page 430: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

pick 969c877 git apply --directory broken for new filespick b75271d git diff <tree>{3,}: do not reverse order of argspick 72d404d test-lib: fix broken printf

# Rebase f285a2d..5c283eb onto f285a2d## Commands:# p, pick = use commit# e, edit = use commit, but stop for amending# s, squash = use commit, but meld into previous commit## If you remove a line here THAT COMMIT WILL BE LOST.# However, if you remove everything, the rebase will be aborted.#~ ~ ~ ~ ~ "~/projects/git/.git/rebase-merge/git-rebase-todo" 14L, 472C

C2

C3

C4

Page 431: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

pick 969c877 git apply --directory broken for new filespick b75271d git diff <tree>{3,}: do not reverse order of argspick 72d404d test-lib: fix broken printf

# Rebase f285a2d..5c283eb onto f285a2d## Commands:# p, pick = use commit# e, edit = use commit, but stop for amending# s, squash = use commit, but meld into previous commit## If you remove a line here THAT COMMIT WILL BE LOST.# However, if you remove everything, the rebase will be aborted.#~ ~ ~ ~ ~ "~/projects/git/.git/rebase-merge/git-rebase-todo" 14L, 472C

Page 432: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

pick 969c877 git apply --directory broken for new filespick b75271d git diff <tree>{3,}: do not reverse order of argspick 72d404d test-lib: fix broken printf

# Rebase f285a2d..5c283eb onto f285a2d## Commands:# p, pick = use commit# e, edit = use commit, but stop for amending# s, squash = use commit, but meld into previous commit## If you remove a line here THAT COMMIT WILL BE LOST.# However, if you remove everything, the rebase will be aborted.#~ ~ ~ ~ ~ "~/projects/git/.git/rebase-merge/git-rebase-todo" 14L, 472C

Page 433: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

pick 969c877 git apply --directory broken for new filespick b75271d git diff <tree>{3,}: do not reverse order of argspick 72d404d test-lib: fix broken printf

# Rebase f285a2d..5c283eb onto f285a2d## Commands:# p, pick = use commit# e, edit = use commit, but stop for amending# s, squash = use commit, but meld into previous commit## If you remove a line here THAT COMMIT WILL BE LOST.# However, if you remove everything, the rebase will be aborted.#~ ~ ~ ~ ~ "~/projects/git/.git/rebase-merge/git-rebase-todo" 14L, 472C

Page 434: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

pick 969c877 git apply --directory broken for new filespick b75271d git diff <tree>{3,}: do not reverse order of argspick 72d404d test-lib: fix broken printf

# Rebase f285a2d..5c283eb onto f285a2d## Commands:# p, pick = use commit# e, edit = use commit, but stop for amending# s, squash = use commit, but meld into previous commit## If you remove a line here THAT COMMIT WILL BE LOST.# However, if you remove everything, the rebase will be aborted.#~ ~ ~ ~ ~ "~/projects/git/.git/rebase-merge/git-rebase-todo" 14L, 472C

Page 435: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

pick 969c877 git apply --directory broken for new filespick b75271d git diff <tree>{3,}: do not reverse order of argspick 72d404d test-lib: fix broken printf

# Rebase f285a2d..5c283eb onto f285a2d## Commands:# p, pick = use commit# e, edit = use commit, but stop for amending# s, squash = use commit, but meld into previous commit## If you remove a line here THAT COMMIT WILL BE LOST.# However, if you remove everything, the rebase will be aborted.#~ ~ ~ ~ ~ "~/projects/git/.git/rebase-merge/git-rebase-todo" 14L, 472C

Page 436: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

edit 969c877 git apply --directory broken for new filespick b75271d git diff <tree>{3,}: do not reverse order of argspick 72d404d test-lib: fix broken printf

# Rebase f285a2d..5c283eb onto f285a2d## Commands:# p, pick = use commit# e, edit = use commit, but stop for amending# s, squash = use commit, but meld into previous commit## If you remove a line here THAT COMMIT WILL BE LOST.# However, if you remove everything, the rebase will be aborted.#~ ~ ~ ~ ~ "~/projects/git/.git/rebase-merge/git-rebase-todo" 14L, 472C

Page 437: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

$ git rebase -i default~2^Stopped at 969c877... git apply --directory broken for new filesYou can amend the commit now, with

git commit --amend

Once you are satisfied with your changes, run

git rebase --continue

$_

Page 438: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

$ git rebase -i default~2^Stopped at 969c877... git apply --directory broken for new filesYou can amend the commit now, with

git commit --amend

Once you are satisfied with your changes, run

git rebase --continue

$_

edit filesgit add

git commit --amendgit rebase --continue

Page 439: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

$ git rebase -i default~2^Stopped at 969c877... git apply --directory broken for new filesYou can amend the commit now, with

git commit --amend

Once you are satisfied with your changes, run

git rebase --continue

$_

edit filesgit add

git commit --amendgit rebase --continue

Page 440: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

$ git rebase -i default~2^Stopped at 969c877... git apply --directory broken for new filesYou can amend the commit now, with

git commit --amend

Once you are satisfied with your changes, run

git rebase --continue

$_

edit filesgit add

git commit --amendgit rebase --continue

Page 441: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

$ git rebase -i default~2^Stopped at 969c877... git apply --directory broken for new filesYou can amend the commit now, with

git commit --amend

Once you are satisfied with your changes, run

git rebase --continue

$_

edit filesgit add

git commit --amendgit rebase --continue

Page 442: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

C1

C0

C2

C3

C4

default

C2'

C3'

C4'

Page 443: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

C1

C0

C2

C3

C4

default

C2'

C3'

C4'

Page 444: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

C1

C0

C2

C3

C4

default

C2'

C3'

C4'

Page 445: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

Squashing commits together

Page 446: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

pick 969c877 git apply --directory broken for new filespick b75271d git diff <tree>{3,}: do not reverse order of argspick 72d404d test-lib: fix broken printf

# Rebase f285a2d..5c283eb onto f285a2d## Commands:# p, pick = use commit# e, edit = use commit, but stop for amending# s, squash = use commit, but meld into previous commit## If you remove a line here THAT COMMIT WILL BE LOST.# However, if you remove everything, the rebase will be aborted.#~ ~ ~ ~ ~ "~/projects/git/.git/rebase-merge/git-rebase-todo" 14L, 472C

Page 447: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

pick 969c877 git apply --directory broken for new filessquash b75271d git diff <tree>{3,}: do not reverse order of argssquash 72d404d test-lib: fix broken printf

# Rebase f285a2d..5c283eb onto f285a2d## Commands:# p, pick = use commit# e, edit = use commit, but stop for amending# s, squash = use commit, but meld into previous commit## If you remove a line here THAT COMMIT WILL BE LOST.# However, if you remove everything, the rebase will be aborted.#~ ~ ~ ~ ~ "~/projects/git/.git/rebase-merge/git-rebase-todo" 14L, 472C

Page 448: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

# This is a combination of 3 commits.# The first commit's message is:git apply --directory broken for new files

# This is the 2nd commit message:

git diff <tree>{3,}: do not reverse order of args

# This is the 3rd commit message:

test-lib: fix broken printf

# Please enter the commit message for your changes. Lines starting# with '#' will be ignored, and an empty message aborts the commit.## Author: Jeff King <[email protected]>## Not currently on any branch.# Changes to be committed:# (use "git reset HEAD <file>..." to unstage)## modified: builtin-apply.c# modified: builtin-diff.c# modified: t/t4013-diff-various.sh# new file: t/t4013/diff.diff_master_master^_side# modified: t/t4128-apply-root.sh# modified: t/test-lib.sh#~ ~ ".git/COMMIT_EDITMSG" 39L, 1454C

Page 449: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

# This is a combination of 3 commits.# The first commit's message is:git apply --directory broken for new files

# This is the 2nd commit message:

git diff <tree>{3,}: do not reverse order of args

# This is the 3rd commit message:

test-lib: fix broken printf

# Please enter the commit message for your changes. Lines starting# with '#' will be ignored, and an empty message aborts the commit.## Author: Jeff King <[email protected]>## Not currently on any branch.# Changes to be committed:# (use "git reset HEAD <file>..." to unstage)## modified: builtin-apply.c# modified: builtin-diff.c# modified: t/t4013-diff-various.sh# new file: t/t4013/diff.diff_master_master^_side# modified: t/t4128-apply-root.sh# modified: t/test-lib.sh#~ ~ ".git/COMMIT_EDITMSG" 39L, 1454C

Page 450: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

# This is a combination of 3 commits.# The first commit's message is:git apply --directory broken for new files

# This is the 2nd commit message:

git diff <tree>{3,}: do not reverse order of args

# This is the 3rd commit message:

test-lib: fix broken printf

# Please enter the commit message for your changes. Lines starting# with '#' will be ignored, and an empty message aborts the commit.## Author: Jeff King <[email protected]>## Not currently on any branch.# Changes to be committed:# (use "git reset HEAD <file>..." to unstage)## modified: builtin-apply.c# modified: builtin-diff.c# modified: t/t4013-diff-various.sh# new file: t/t4013/diff.diff_master_master^_side# modified: t/t4128-apply-root.sh# modified: t/test-lib.sh#~ ~ ".git/COMMIT_EDITMSG" 39L, 1454C

Page 451: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

# This is a combination of 3 commits.# The first commit's message is:git apply --directory broken for new files

# This is the 2nd commit message:

git diff <tree>{3,}: do not reverse order of args

# This is the 3rd commit message:

test-lib: fix broken printf

# Please enter the commit message for your changes. Lines starting# with '#' will be ignored, and an empty message aborts the commit.## Author: Jeff King <[email protected]>## Not currently on any branch.# Changes to be committed:# (use "git reset HEAD <file>..." to unstage)## modified: builtin-apply.c# modified: builtin-diff.c# modified: t/t4013-diff-various.sh# new file: t/t4013/diff.diff_master_master^_side# modified: t/t4128-apply-root.sh# modified: t/test-lib.sh#~ ~ ".git/COMMIT_EDITMSG" 39L, 1454C

Page 452: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

C1

C0

C2

C3

C4

default

C5

Page 453: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

The Perils

Page 454: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

C1

C0

default

scott jessica

Page 455: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

C0

default

scott jessica

C1

C0

scott/default

default

C2

C3

C4

C1

Page 456: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

C0

C5

C6

C7

default

scott jessica

C1

C0

scott/default default

C2

C3

C4

C1

C5

C6

C7

Page 457: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

C0

C5

C6

C7

default

scott jessica

C1

C0

scott/default

default

C2

C3

C4

C1

C5

C6

C7

C8

Page 458: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

C0

C5

C6

C7

default

scott jessica

C1

C0

scott/default

default

C2

C3

C4

C1

C5

C6

C7

C5'

C6'

C7'

C8

Page 459: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

C0

C5

C6

C7

default

scott jessica

C1

C0

scott/default

default

C2

C3

C4

C1

C5

C6

C7

C5'

C6'

C7'

C8

C5'

C6'

C7'

Page 460: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

C0

C5

C6

C7

default

scott jessica

C1

C0

scott/default

default

C2

C3

C4

C1

C5

C6

C7

C5'

C6'

C7'

C8

C5'

C6'

C7'

C9

Page 461: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

Filter BranchHistory Revision on Steroids

Page 462: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

remove all instances of a file from every commit

Page 463: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

git filter-branch --tree-filter 'rm -f filename'

HEAD

Page 464: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

change your email in all commits

Page 465: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

git filter-branch --env-filter "export [email protected]"

HEAD

Page 466: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

git filter-branch --env-filter "export [email protected]"

origin/master..HEAD

Page 467: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

Cherry Picking

Page 468: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

git cherry-pick 3f40a

Page 469: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

C1

C0

C2

C6

C7

C3

C4 C8

C9C5

m/cupcake default

experiment

C10

Page 470: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

C1

C0

C2

C6

C7

C3

C4 C8

C9C5

m/cupcake default

experiment

C10

Page 471: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

C1

C0

C2

C6

C7

C3

C4 C8

C9C5

m/cupcake default

experiment

C10

Page 472: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

C1

C0

C2

C6

C7

C3

C4 C8

C9C5

m/cupcake default

experiment

C10

Page 473: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

C1

C0

C2

C6

C7

C3

C4 C8

C9C5

m/cupcake default

experiment

C10

git checkout default

Page 474: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

C1

C0

C2

C6

C7

C3

C4 C8

C9C5

m/cupcake default

experiment

C10

git cherry-pick c9

Page 475: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

C1

C0

C2

C6

C7

C3

C4 C8

C9C5

m/cupcake default

experiment

C10

git cherry-pick c9git cherry-pick experiment^

Page 476: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

C1

C0

C2

C6

C7

C3

C4 C8

C9C5

m/cupcake default

experiment

C10

git cherry-pick c9

Page 477: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

C1

C0

C2

C6

C7

C3

C4 C8

C9C5

m/cupcake

default experiment

C10C9'

Page 478: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

C1

C0

C2

C6

C7

C3

C4 C8

C9C5

m/cupcake

default experiment

C10C9'

git branch -d experiment

Page 479: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

C1

C0

C2

C6

C7

C3

C4 C8

C9C5

m/cupcake

default experiment

C10C9'

Page 480: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

Undo

Page 481: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

Single File

Page 482: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

git checkout [commit] file

Page 483: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

$ git checkout master@{yesterday} system/core/netcfg/netcfg.c

Page 484: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

Entire Project

Page 485: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

git reset

Page 486: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

$ git status# Not currently on any branch.# Changes to be committed:# (use "git reset HEAD <file>..." to unstage)## modified: src/com/android/launcher/Workspace.java## Changed but not updated:# (use "git add <file>..." to update what will be committed)# (use "git checkout -- <file>..." to discard changes in working directory)## modified: src/com/android/launcher/LiveFolder.java#

Page 487: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

$ git status# Not currently on any branch.# Changes to be committed:# (use "git reset HEAD <file>..." to unstage)## modified: src/com/android/launcher/Workspace.java## Changed but not updated:# (use "git add <file>..." to update what will be committed)# (use "git checkout -- <file>..." to discard changes in working directory)## modified: src/com/android/launcher/LiveFolder.java#

Page 488: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

$ git status# Not currently on any branch.# Changes to be committed:# (use "git reset HEAD <file>..." to unstage)## modified: src/com/android/launcher/Workspace.java## Changed but not updated:# (use "git add <file>..." to update what will be committed)# (use "git checkout -- <file>..." to discard changes in working directory)## modified: src/com/android/launcher/LiveFolder.java#

Page 489: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

$ git status# Not currently on any branch.# Changes to be committed:# (use "git reset HEAD <file>..." to unstage)## modified: src/com/android/launcher/Workspace.java## Changed but not updated:# (use "git add <file>..." to update what will be committed)# (use "git checkout -- <file>..." to discard changes in working directory)## modified: src/com/android/launcher/LiveFolder.java#

Page 490: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

by default, reset changes the staging area

Page 491: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

$ git status# Not currently on any branch.# Changes to be committed:# (use "git reset HEAD <file>..." to unstage)## modified: src/com/android/launcher/Workspace.java## Changed but not updated:# (use "git add <file>..." to update what will be committed)# (use "git checkout -- <file>..." to discard changes in working directory)## modified: src/com/android/launcher/LiveFolder.java#

Page 492: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

$ git reset --hard

Page 493: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

--hard changes stage and working directory

Page 494: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

you’ve made commits, but want to move them

to a topic branch

Page 495: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

$ git branch experiment $ git reset --hard origin/master$ git checkout topicname

Page 496: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

$ git branch experiment $ git reset --hard origin/master$ git checkout topicname

Page 497: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

$ git branch experiment $ git reset --hard origin/master$ git checkout experiment

Page 498: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

C0

HEAD

C1origin/master

master

Page 499: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

C0

HEAD

C1origin/master

master

C2

C3

Page 500: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

C0

HEAD

C1origin/master

master

C2

C3 experiment

git checkout experiment

Page 501: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

C0

HEAD

C1origin/master

master C2

C3 experiment

git reset --hard origin/master

Page 502: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

C0

HEAD

C1origin/master

master C2

C3

experiment

C4

git commit

Page 503: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

Bisect

Page 504: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

binary search for where a bug was introduced

Page 505: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

$ git bisect start$ git bisect bad$ git bisect good 3acb4c2c6666ed6cb91cb0b983efe9d50cf8cfbeBisecting: 6 revisions left to test after this[ecb6e1bc347ccecc5f9350d878ce677feb13d3b2] error handling on repo$ git bisect goodBisecting: 3 revisions left to test after this[b047b02ea83310a70fd603dc8cd7a6cd13d15c04] secure this thing$ git bisect badBisecting: 1 revisions left to test after this[f71ce38690acf49c1f3c9bea38e09d82a5ce6014] drop exceptions table and$ git bisect goodb047b02ea83310a70fd603dc8cd7a6cd13d15c04 is first bad commitcommit b047b02ea83310a70fd603dc8cd7a6cd13d15c04Author: PJ Hyett <[email protected]>Date: Tue Jan 27 14:48:32 2009 -0800

secure this thing

:040000 040000 40ee3e7821b895e52c1695092db9bdc4c61d1730 f24d3c6ebcfc639b1a3814550e62d60b8e68a8e4 M config

Page 506: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

$ git bisect start$ git bisect bad$ git bisect good 3acb4c2c6666ed6cb91cb0b983efe9d50cf8cfbeBisecting: 6 revisions left to test after this[ecb6e1bc347ccecc5f9350d878ce677feb13d3b2] error handling on repo$ git bisect goodBisecting: 3 revisions left to test after this[b047b02ea83310a70fd603dc8cd7a6cd13d15c04] secure this thing$ git bisect badBisecting: 1 revisions left to test after this[f71ce38690acf49c1f3c9bea38e09d82a5ce6014] drop exceptions table and$ git bisect goodb047b02ea83310a70fd603dc8cd7a6cd13d15c04 is first bad commitcommit b047b02ea83310a70fd603dc8cd7a6cd13d15c04Author: PJ Hyett <[email protected]>Date: Tue Jan 27 14:48:32 2009 -0800

secure this thing

:040000 040000 40ee3e7821b895e52c1695092db9bdc4c61d1730 f24d3c6ebcfc639b1a3814550e62d60b8e68a8e4 M config

Page 507: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

$ git bisect start$ git bisect bad$ git bisect good 3acb4c2c6666ed6cb91cb0b983efe9d50cf8cfbeBisecting: 6 revisions left to test after this[ecb6e1bc347ccecc5f9350d878ce677feb13d3b2] error handling on repo$ git bisect goodBisecting: 3 revisions left to test after this[b047b02ea83310a70fd603dc8cd7a6cd13d15c04] secure this thing$ git bisect badBisecting: 1 revisions left to test after this[f71ce38690acf49c1f3c9bea38e09d82a5ce6014] drop exceptions table and$ git bisect goodb047b02ea83310a70fd603dc8cd7a6cd13d15c04 is first bad commitcommit b047b02ea83310a70fd603dc8cd7a6cd13d15c04Author: PJ Hyett <[email protected]>Date: Tue Jan 27 14:48:32 2009 -0800

secure this thing

:040000 040000 40ee3e7821b895e52c1695092db9bdc4c61d1730 f24d3c6ebcfc639b1a3814550e62d60b8e68a8e4 M config

Page 508: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

$ git bisect start$ git bisect bad$ git bisect good 3acb4c2c6666ed6cb91cb0b983efe9d50cf8cfbeBisecting: 6 revisions left to test after this[ecb6e1bc347ccecc5f9350d878ce677feb13d3b2] error handling on repo$ git bisect goodBisecting: 3 revisions left to test after this[b047b02ea83310a70fd603dc8cd7a6cd13d15c04] secure this thing$ git bisect badBisecting: 1 revisions left to test after this[f71ce38690acf49c1f3c9bea38e09d82a5ce6014] drop exceptions table and$ git bisect goodb047b02ea83310a70fd603dc8cd7a6cd13d15c04 is first bad commitcommit b047b02ea83310a70fd603dc8cd7a6cd13d15c04Author: PJ Hyett <[email protected]>Date: Tue Jan 27 14:48:32 2009 -0800

secure this thing

:040000 040000 40ee3e7821b895e52c1695092db9bdc4c61d1730 f24d3c6ebcfc639b1a3814550e62d60b8e68a8e4 M config

Page 509: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

$ git bisect start$ git bisect bad$ git bisect good 3acb4c2c6666ed6cb91cb0b983efe9d50cf8cfbeBisecting: 6 revisions left to test after this[ecb6e1bc347ccecc5f9350d878ce677feb13d3b2] error handling on repo$ git bisect goodBisecting: 3 revisions left to test after this[b047b02ea83310a70fd603dc8cd7a6cd13d15c04] secure this thing$ git bisect badBisecting: 1 revisions left to test after this[f71ce38690acf49c1f3c9bea38e09d82a5ce6014] drop exceptions table and$ git bisect goodb047b02ea83310a70fd603dc8cd7a6cd13d15c04 is first bad commitcommit b047b02ea83310a70fd603dc8cd7a6cd13d15c04Author: PJ Hyett <[email protected]>Date: Tue Jan 27 14:48:32 2009 -0800

secure this thing

:040000 040000 40ee3e7821b895e52c1695092db9bdc4c61d1730 f24d3c6ebcfc639b1a3814550e62d60b8e68a8e4 M config

Page 510: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

$ git bisect start$ git bisect bad$ git bisect good 3acb4c2c6666ed6cb91cb0b983efe9d50cf8cfbeBisecting: 6 revisions left to test after this[ecb6e1bc347ccecc5f9350d878ce677feb13d3b2] error handling on repo$ git bisect goodBisecting: 3 revisions left to test after this[b047b02ea83310a70fd603dc8cd7a6cd13d15c04] secure this thing$ git bisect badBisecting: 1 revisions left to test after this[f71ce38690acf49c1f3c9bea38e09d82a5ce6014] drop exceptions table and$ git bisect goodb047b02ea83310a70fd603dc8cd7a6cd13d15c04 is first bad commitcommit b047b02ea83310a70fd603dc8cd7a6cd13d15c04Author: PJ Hyett <[email protected]>Date: Tue Jan 27 14:48:32 2009 -0800

secure this thing

:040000 040000 40ee3e7821b895e52c1695092db9bdc4c61d1730 f24d3c6ebcfc639b1a3814550e62d60b8e68a8e4 M config

Page 511: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

$ git bisect start$ git bisect bad$ git bisect good 3acb4c2c6666ed6cb91cb0b983efe9d50cf8cfbeBisecting: 6 revisions left to test after this[ecb6e1bc347ccecc5f9350d878ce677feb13d3b2] error handling on repo$ git bisect goodBisecting: 3 revisions left to test after this[b047b02ea83310a70fd603dc8cd7a6cd13d15c04] secure this thing$ git bisect badBisecting: 1 revisions left to test after this[f71ce38690acf49c1f3c9bea38e09d82a5ce6014] drop exceptions table and$ git bisect goodb047b02ea83310a70fd603dc8cd7a6cd13d15c04 is first bad commitcommit b047b02ea83310a70fd603dc8cd7a6cd13d15c04Author: PJ Hyett <[email protected]>Date: Tue Jan 27 14:48:32 2009 -0800

secure this thing

:040000 040000 40ee3e7821b895e52c1695092db9bdc4c61d1730 f24d3c6ebcfc639b1a3814550e62d60b8e68a8e4 M config

Page 512: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

$ git bisect start$ git bisect bad$ git bisect good 3acb4c2c6666ed6cb91cb0b983efe9d50cf8cfbeBisecting: 6 revisions left to test after this[ecb6e1bc347ccecc5f9350d878ce677feb13d3b2] error handling on repo$ git bisect goodBisecting: 3 revisions left to test after this[b047b02ea83310a70fd603dc8cd7a6cd13d15c04] secure this thing$ git bisect badBisecting: 1 revisions left to test after this[f71ce38690acf49c1f3c9bea38e09d82a5ce6014] drop exceptions table$ git bisect goodb047b02ea83310a70fd603dc8cd7a6cd13d15c04 is first bad commitcommit b047b02ea83310a70fd603dc8cd7a6cd13d15c04Author: PJ Hyett <[email protected]>Date: Tue Jan 27 14:48:32 2009 -0800

secure this thing

:040000 040000 40ee3e7821b895e52c1695092db9bdc4c61d1730 f24d3c6ebcfc639b1a3814550e62d60b8e68a8e4 M config

Page 513: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

$ git bisect start$ git bisect bad$ git bisect good 3acb4c2c6666ed6cb91cb0b983efe9d50cf8cfbeBisecting: 6 revisions left to test after this[ecb6e1bc347ccecc5f9350d878ce677feb13d3b2] error handling on repo$ git bisect goodBisecting: 3 revisions left to test after this[b047b02ea83310a70fd603dc8cd7a6cd13d15c04] secure this thing$ git bisect badBisecting: 1 revisions left to test after this[f71ce38690acf49c1f3c9bea38e09d82a5ce6014] drop exceptions table$ git bisect goodb047b02ea83310a70fd603dc8cd7a6cd13d15c04 is first bad commitcommit b047b02ea83310a70fd603dc8cd7a6cd13d15c04Author: PJ Hyett <[email protected]>Date: Tue Jan 27 14:48:32 2009 -0800

secure this thing

:040000 040000 40ee3e7821b895e52c1695092db9bdc4c61d1730 f24d3c6ebcfc639b1a3814550e62d60b8e68a8e4 M config

Page 514: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

$ git bisect start$ git bisect bad$ git bisect good 3acb4c2c6666ed6cb91cb0b983efe9d50cf8cfbeBisecting: 6 revisions left to test after this[ecb6e1bc347ccecc5f9350d878ce677feb13d3b2] error handling on repo$ git bisect goodBisecting: 3 revisions left to test after this[b047b02ea83310a70fd603dc8cd7a6cd13d15c04] secure this thing$ git bisect badBisecting: 1 revisions left to test after this[f71ce38690acf49c1f3c9bea38e09d82a5ce6014] drop exceptions table$ git bisect goodb047b02ea83310a70fd603dc8cd7a6cd13d15c04 is first bad commitcommit b047b02ea83310a70fd603dc8cd7a6cd13d15c04Author: PJ Hyett <[email protected]>Date: Tue Jan 27 14:48:32 2009 -0800

secure this thing

:040000 040000 40ee3e7821b895e52c1695092db9bdc4c61d1730 f24d3c6ebcfc639b1a3814550e62d60b8e68a8e4 M config

Page 515: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

$ git bisect start$ git bisect bad$ git bisect good 3acb4c2c6666ed6cb91cb0b983efe9d50cf8cfbeBisecting: 6 revisions left to test after this[ecb6e1bc347ccecc5f9350d878ce677feb13d3b2] error handling on repo$ git bisect goodBisecting: 3 revisions left to test after this[b047b02ea83310a70fd603dc8cd7a6cd13d15c04] secure this thing$ git bisect badBisecting: 1 revisions left to test after this[f71ce38690acf49c1f3c9bea38e09d82a5ce6014] drop exceptions table$ git bisect goodb047b02ea83310a70fd603dc8cd7a6cd13d15c04 is first bad commitcommit b047b02ea83310a70fd603dc8cd7a6cd13d15c04Author: PJ Hyett <[email protected]>Date: Tue Jan 27 14:48:32 2009 -0800

secure this thing

:040000 040000 40ee3e7821b895e52c1695092db9bdc4c61d1730 f24d3c6ebcfc639b1a3814550e62d60b8e68a8e4 M config

Page 516: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

$ git bisect reset

Page 517: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

now...

Page 518: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

go use Git to write an amazing program that helps create an

inexpensive and unending food supply that will make sure than nobody goes hungry ever again

Page 519: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

boom.

Page 520: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

that’s it!don’t forget your stickers!

Page 521: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

Resources

Page 522: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

Resourcesgit-scm.com

Page 523: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

Resourcesgit-scm.com

gitcasts.com

Page 524: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

Resourcesgit-scm.com

gitcasts.com

learn.github.com

Page 525: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

Resourcesgit-scm.com

gitcasts.com

learn.github.com

#git / #github on IRC

Page 526: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

Resourcesgit-scm.com

gitcasts.com

learn.github.com

#git / #github on IRC

peepcode - git book and screencast

Page 527: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

Resourcesgit-scm.com

gitcasts.com

learn.github.com

#git / #github on IRC

peepcode - git book and screencast

[email protected]

Page 528: How to Use Git to Solve World Hungerchacon.s3.amazonaws.com/GitTalk-SOR09.pdf · no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files

Resourcesgit-scm.com

gitcasts.com

learn.github.com

#git / #github on IRC

peepcode - git book and screencast

[email protected]

me, in person, tonight, someplace that serves whiskey