Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Quick Git Talk

79c320d5af1feee21c58b8cb21692d38?s=47 Randall Hunt
December 06, 2014

Quick Git Talk

79c320d5af1feee21c58b8cb21692d38?s=128

Randall Hunt

December 06, 2014
Tweet

Transcript

  1. Learn You Some Git Not Your Average Git Talk

  2. GIT IS NOT REVISION CONTROL SOFTWARE

  3. GIT is a filesystem

  4. None
  5. None
  6. Content Addressable Filesystem

  7. "Who are you and why are you still talking?"

  8. •I am called Randall •I know more about git than

    you •Probably... maybe...
  9. None
  10. •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
  11. s

  12. None
  13. •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.
  14. HALP! Wat is git?

  15. GIT IS MAGIC •Easy Context Switching •Role-based codelines •Feature based

    workflow •Easy Experimentation
  16. Distributed
 Version Control

  17. None
  18. None
  19. None
  20. working directory git add -p files staging area

  21. git commit -m "holla" staging area git database

  22. Git Saves You From Yourself

  23. None
  24. DEMO

  25. DO YOUR WORK IN BRANCHES!

  26. NO REALLY. git checkout -b feature

  27. Content Addressable Filesystem

  28. git hash-object refs.c sha1(a77458f2f6eb108a90a1cf3d2cc4a771549c05f9)

  29. Your Content Is Your Address

  30. 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!
  31. BRANCHES ARE REFERENCES TO COMMITS

  32. COMMITS ARE POINTERS TO TREES

  33. TREES ARE POINTERS TO TREES AND BLOBS

  34. BLOBS ARE ZLIB COMPRESSED FILES

  35. None
  36. DIRECTED ACYCLIC GRAPH

  37. None
  38. RECAP • Commits -> N pointers to parents, date, metadata

    • Trees -> Point to trees where leaf nodes are blobs • Blobs -> ZLIB compressed files RECAP RECAP
  39. THIS IS NOT A TOILET

  40. None
  41. commit, branch, log, diff, add, etc.

  42. None
  43. hash-object, cat-file, ls-tree, (un)pack

  44. None
  45. GIT QUESTIONS?

  46. I GIT ANSWERS