Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Git Without Puns

1,345 views

Published on

see http://chicagoalt.net/event/June2009Meeting-GitWithoutPuns

  • Be the first to comment

  • Be the first to like this

Git Without Puns

  1. 1. --- +++ Chicago ALT.NET June 10th 2009 Sergio Pereira sergio@sergiopereira.com http://sergiopereira.com/blog @sergiopereira 1
  2. 2. Linux kernel development Linus Torvalds, mid-2005 Replaces BitKeeper Perl  C 2
  3. 3. msysGit: wizard-style installer installer or macports packaged (apt, yum, rpm) 3
  4. 4. compile from source! 4
  5. 5. Git on Windows 5
  6. 6. 6
  7. 7. 1st class citizens Local or remote Low ceremony No politics, no conventions Branch, branch, branch 7
  8. 8. Download deltas Local merge (fast) No magic for conflicts Tracks change authors and committer 8
  9. 9. • HTTP, HTTPS • GIT • File system • SSH • rsync • patch files ;) 9
  10. 10. .git Git Object directory commands database Repository Compression High level (porcelain) Encryption Configuration Blobs References Trees Low level Commits (plumbing) Hooks Tags 10
  11. 11. • Secure Hash Algorithm • Global identity • Authenticity da9973c6f9600d90e64aac647f3ed22dfd692f70 11
  12. 12. BLOB using System.IO; public class Whatever { // … } 5,811 bytes d56210fee9133… 12
  13. 13. TREE blob web.config 4df3bb723… blob global.asax aee87dc6a… tree bin d1c4a7220… tree images 6f32f4409… … 301 bytes 61bcb4a4f922e… 13
  14. 14. COMMIT tree 4df3bb723… parent aee87dc6a… author Joe Dev <joe@acme.com> 2009-04-03 13:45 -0600 committer Zack Fu <zack@acme.com> 2009-04-07 09:03 -0800 Added ability to pay with international credit cards… 1,082 bytes cbc72a29fd… 14
  15. 15. TAG type commit object cbc72a29fd… name v1.9.23 tagger Zack Fu <zack@acme.com> 2009-04-06 17:56 -0800 This release contains the improvements made to… 221 bytes 836dd4aa… 15
  16. 16. Git Object Model 16
  17. 17. commit: cbc72a29… tree: 61bcb4a4… tree: 8e6ac483… d56210fe… ca579aa3… ef49a6c6… 17
  18. 18. commit: cbc72a29… commit: b3a90c64… parent tree: 61bcb4a4… tree: 4d5fee12… tree: 8e6ac483… d56210fe… tree: 385de46a… ca579aa3… ef49a6c6… 37bf5ee1… 18
  19. 19. working directory index master git add git commit git push origin/master 19
  20. 20. *D F E E E E D D D C C C C B B B B A A A A MERGE REBASE 20
  21. 21. Gitting Getting to work 21
  22. 22. SHA fragment Remote name git cat-file commit a6ed git log origin/master git log refs/remotes/origin/master Branch name Tag name git log some-branch git log v2.2.5 git log refs/heads/some-branch git log refs/tags/v2.2.5 22
  23. 23. By date Caret parent git ls-tree "master@{3 days ago}" git ls-tree my-branch^ git ls-tree master@{yesterday} git ls-tree my-branch^2 git ls-tree master@{2009-04-22} git ls-tree my-branch^^^^ By sequence Tilde parent git ls-tree master@{3} git ls-tree my-branch~3 [^^^] git ls-tree master~3^2~4 23
  24. 24. Natural dev2 dev1 dev4 dev3 24
  25. 25. Central Repo dev2 dev1 shared dev4 dev3 25
  26. 26. Benevolent blessed Dictator dev1 boss dev2 lead1 dev3 lead2 dev4 26
  27. 27. Integration dev1 dev1' Manager boss' boss dev2 dev2' dev3 dev3' 27
  28. 28. GitHub: Social Forking 28
  29. 29. 29
  30. 30. (see you next month to learn more about Fluent NHibernate) 30

×