Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Speaker Deck
PRO
Sign in
Sign up
for free
Quick Git Talk
Randall Hunt
December 06, 2014
Programming
0
120
Quick Git Talk
Randall Hunt
December 06, 2014
Tweet
Share
More Decks by Randall Hunt
See All by Randall Hunt
ranman
1
530
ranman
0
98
ranman
0
130
ranman
0
33
ranman
0
56
Other Decks in Programming
See All in Programming
tarappo
4
440
bkuhlmann
6
710
hr01
1
4.3k
uhyo
19
9.2k
sgeengineer
1
200
hamakou108
4
520
manfredsteyer
PRO
2
260
techharmony
0
190
pco2699
0
100
77web
2
2.5k
minecr
0
120
devinjeon
2
880
Featured
See All Featured
tmm1
61
9.9k
revolveconf
201
9.7k
deanohume
294
28k
jrom
116
7.2k
tanoku
86
8.6k
jlugia
217
16k
lara
172
9.8k
caitiem20
311
17k
colly
188
14k
malarkey
392
61k
lauravandoore
440
28k
chriscoyier
498
130k
Transcript
Learn You Some Git Not Your Average Git Talk
GIT IS NOT REVISION CONTROL SOFTWARE
GIT is a filesystem
None
None
Content Addressable Filesystem
"Who are you and why are you still talking?"
•I am called Randall •I know more about git than
you •Probably... maybe...
None
•I am called Randall •I know more about git than
you •Probably... maybe... •I work at AWS •I tweet @jrhunt •I wrote gitshots •I write great commit messages
s
None
•I am called Randall •I know more about git than
you •Probably... maybe... •I work at AWS •I tweet @jrhunt •I wrote gitshots •I write great commit messages •8 major patches to GIT •All of them rejected.
HALP! Wat is git?
GIT IS MAGIC •Easy Context Switching •Role-based codelines •Feature based
workflow •Easy Experimentation
Distributed Version Control
None
None
None
working directory git add -p files staging area
git commit -m "holla" staging area git database
Git Saves You From Yourself
None
DEMO
DO YOUR WORK IN BRANCHES!
NO REALLY. git checkout -b feature
Content Addressable Filesystem
git hash-object refs.c sha1(a77458f2f6eb108a90a1cf3d2cc4a771549c05f9)
Your Content Is Your Address
SHA1 1. Add Data 2. Add More Data 3. Mix
it all around 4. Get a magic number "unique" (mostly) 160 bits of ADDRESS MATH!
BRANCHES ARE REFERENCES TO COMMITS
COMMITS ARE POINTERS TO TREES
TREES ARE POINTERS TO TREES AND BLOBS
BLOBS ARE ZLIB COMPRESSED FILES
None
DIRECTED ACYCLIC GRAPH
None
RECAP • Commits -> N pointers to parents, date, metadata
• Trees -> Point to trees where leaf nodes are blobs • Blobs -> ZLIB compressed files RECAP RECAP
THIS IS NOT A TOILET
None
commit, branch, log, diff, add, etc.
None
hash-object, cat-file, ls-tree, (un)pack
None
GIT QUESTIONS?
I GIT ANSWERS