How GitWorks Git IsNotWhatYouThink Were going to talk aboutthe - - PowerPoint PPT Presentation

how gitworks
SMART_READER_LITE
LIVE PREVIEW

How GitWorks Git IsNotWhatYouThink Were going to talk aboutthe - - PowerPoint PPT Presentation

How GitWorks Git IsNotWhatYouThink Were going to talk aboutthe internals ofGit. Porcelain Commands gitadd gitcommit git push gitpull git branch gitcheckout git merge gitrebase


slide-1
SLIDE 1

Git IsNotWhatYouThink

How GitWorks

slide-2
SLIDE 2

We’re going to talk aboutthe internals ofGit.

slide-3
SLIDE 3

“Porcelain”Commands

▪ ▪ ▪ ▪ ▪ ▪ ▪ ▪ ▪

gitadd gitcommit git push gitpull git branch gitcheckout git merge gitrebase …

slide-4
SLIDE 4

“Plumbing”Commands

▪ ▪ ▪ ▪

git cat-file git hash-object gitcount-objects …

slide-5
SLIDE 5

If youwant to masterGit,don’tworry about learning thecommands. Instead, learn themodel.

slide-6
SLIDE 6

Git

slide-7
SLIDE 7

GitIs..

…a Distributed RevisionControl System

slide-8
SLIDE 8

GitIs..

…a Revision ControlSystem

slide-9
SLIDE 9

GitIs..

…aStupid Content Tracker

slide-10
SLIDE 10

GitIs..

…a PersistentMap

slide-11
SLIDE 11

Any sequence ofbytes SHA1hash

Values andKeys

slide-12
SLIDE 12

“ApplePie” 23991897e13e47ed0adb91a0082c31c82fe0cbe5

Values andKeys

slide-13
SLIDE 13

Every object in Git hasitsown SHA1. So, what if theycollide?

slide-14
SLIDE 14

Winning theJackpot

1 chance in175.000.000

slide-15
SLIDE 15

Winning theJackpot

slide-16
SLIDE 16

Chances of Two SHA1sColliding

slide-17
SLIDE 17

SHA1s are unique in theuniverse.

slide-18
SLIDE 18

GitIs..

…a PersistentMap

slide-19
SLIDE 19

GitIs..

…aStupid Content Tracker

slide-20
SLIDE 20

The ObjectDatabase

1177 be4d

./

slide-21
SLIDE 21

The ObjectDatabase

Apple Pie

1177 2399 be4d

menu.txt

./

3ee7

recipes/

slide-22
SLIDE 22

The ObjectDatabase

Apple Pie

Put your recipes in this directory, recipe per

  • ne

file.

1177 2399 361a be4d

README.txt

3ee7

apple_pie.txt menu.txt

./

recipes/

slide-23
SLIDE 23

The Git ObjectModel

Apple Pie

Put your recipes in this directory, recipe per

  • ne

file.

1177 2399 361a be4d

README.txt

3ee7

apple_pie.txt menu.txt

./

recipes/

slide-24
SLIDE 24

The Git ObjectModel

Apple Pie

Put your recipes in this directory, recipe per

  • ne

file.

1177 2399 361a be4d

README.txt

2508 3ee7

apple_pie.txt menu.txt

./

recipes/

slide-25
SLIDE 25

The Git ObjectModel

Apple Pie

Put your recipes in this directory, recipe per

  • ne

file.

1177 2399 361a be4d

README.txt

2508 6ee0 3ee7

apple_pie.txt

./

menu.txt

./

recipes/

slide-26
SLIDE 26

The Git ObjectModel

Apple Pie

Put your recipes in this directory, recipe per

  • ne

file.

1177 2399 361a be4d

README.txt

2508 6ee0 f1fe 3ee7

apple_pie.txt

./

Apple Pie Cheesecake

menu.txt menu.txt recipes/

./

recipes/

slide-27
SLIDE 27

The Git ObjectModel

Apple Pie

Put your recipes in this directory, recipe per

  • ne

file.

1177 2399 361a be4d

README.txt

2508 6ee0 f1fe 3ee7

apple_pie.txt

./

Apple Pie Cheesecake

menu.txt menu.txt recipes/

./

recipes/

mytag

slide-28
SLIDE 28

GitObjects

▪ ▪ ▪ ▪

Blobs Trees Commits AnnotatedTags

slide-29
SLIDE 29

What Git ReallyIs

1177 2399 3ee7 361a be4d 2508 6ee0 f1fe

slide-30
SLIDE 30

GitIs..

…aStupid Content Tracker