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

Introduction to Git

9956ec83f77ba58c81551c614e036523?s=47 Ben Straub
January 25, 2013

Introduction to Git

A 3-hour course on introductory git. See the shell transcript and outline at https://gist.github.com/4593102.

9956ec83f77ba58c81551c614e036523?s=128

Ben Straub

January 25, 2013
Tweet

Transcript

  1. l e v e l u p An  introductory  exploration

     of  the  Git  tool  set © 2012, GitHub, Inc. and Friday, January 25, 13
  2. Ben Straub github.com/ben Friday, January 25, 13

  3. Configuration Line endings Friday, January 25, 13

  4. line endings Friday, January 25, 13

  5. Friday, January 25, 13

  6. VS Friday, January 25, 13

  7. Friday, January 25, 13

  8. VS LF CRLF Friday, January 25, 13

  9. default is to do nothing Friday, January 25, 13

  10. http://help.github.com/dealing-with-lineendings/ Friday, January 25, 13

  11. # Do this on OS X and Linux git config

    --global core.autocrlf input # Do this on Windows git config --global core.autocrlf true Friday, January 25, 13
  12. Configuration Commit Message Editor Friday, January 25, 13

  13. Friday, January 25, 13

  14. Friday, January 25, 13

  15. ? Used the VI editor? Friday, January 25, 13

  16. ✓Used the VI editor? Friday, January 25, 13

  17. I y ;WQ Friday, January 25, 13

  18. an alternate editor? Friday, January 25, 13

  19. GitPad wraps Notepad (or $EDITOR) Friday, January 25, 13

  20. GitPad wraps Notepad (or $EDITOR) O ption 1 Friday, January

    25, 13
  21. http://github.com/github/GitPad O ption 1 Friday, January 25, 13

  22. Run GitPad ...registers & wraps Notepad as the editor O

    ption 1 Friday, January 25, 13
  23. Git-specific configuration option Friday, January 25, 13

  24. Git-specific configuration option O ption 2 Friday, January 25, 13

  25. #for TextMate on Mac git config --global core.editor "mate -w"

    #for Notepad2 on Windows git config --global core.editor "notepad2.exe" #for emacs on Linux git config --global core.editor "emacs" O ption 2 Friday, January 25, 13
  26. O ption 2 Friday, January 25, 13

  27. Workflows Usage Models Friday, January 25, 13

  28. Central Repo C e n t r a l i

    z e d Friday, January 25, 13
  29. Blessed Repo D i c t a t o r

    s h i p Friday, January 25, 13
  30. Blessed Repo D i c t a t o r

    s h i p Friday, January 25, 13
  31. Blessed Repo D i c t a t o r

    s h i p Friday, January 25, 13
  32. Blessed Repo D i c t a t o r

    s h i p Friday, January 25, 13
  33. Blessed Repo D i c t a t o r

    s h i p Friday, January 25, 13
  34. Certified Repo Development Repo n t e g r a

    t i o n M a n a g e d Continuous Integration Server Friday, January 25, 13
  35. Certified Repo Development Repo n t e g r a

    t i o n M a n a g e d Continuous Integration Server Friday, January 25, 13
  36. Certified Repo Development Repo n t e g r a

    t i o n M a n a g e d Continuous Integration Server Friday, January 25, 13
  37. Certified Repo Development Repo n t e g r a

    t i o n M a n a g e d Continuous Integration Server Friday, January 25, 13
  38. C u s t o m + P u b

    l i c C o n t r i b ☚ Private Public ☛ GitHub Friday, January 25, 13
  39. C u s t o m + P u b

    l i c C o n t r i b ☚ Private Public ☛ GitHub Friday, January 25, 13
  40. C u s t o m + P u b

    l i c C o n t r i b Customized ☚ Private Public ☛ GitHub Friday, January 25, 13
  41. C u s t o m + P u b

    l i c C o n t r i b Customized ☚ Private Public ☛ GitHub Friday, January 25, 13
  42. Mirror Development Repo M i r r o r e

    d Mirror Certified Repo Friday, January 25, 13
  43. Mirror Development Repo M i r r o r e

    d Mirror Certified Repo Friday, January 25, 13
  44. Fundamentals Hashes Friday, January 25, 13

  45. centralized VCSs use sequential revision numbers Friday, January 25, 13

  46. Git uses a SHA-1 hash Friday, January 25, 13

  47. Friday, January 25, 13

  48. 40 hex characters (20 bytes) Friday, January 25, 13

  49. 9AB223D28B1AA46EF1780B22F304982E39872C34 Friday, January 25, 13

  50. 9AB223D28B1AA46EF1780B22F304982E39872C34 <html> <body> <p>This is a test</p> <img src="http://ai.com/icon.gif"> </body>

    </html> Friday, January 25, 13
  51. <html> <body> <p>This is a test</p> <img src="http://ai.com/icon.gif"> </body> </html>

    9AB223D28B1AA46EF1780B22F304982E39872C34 Friday, January 25, 13
  52. use as little of it as is unique Friday, January

    25, 13
  53. Fundamentals Objects & Refs Friday, January 25, 13

  54. ‣Blob ‣Tree ‣Commit ‣Tag Friday, January 25, 13

  55. tree tree: 7e8b1 web blob: 9ab16 index.html a10b3 tree blob:

    8d162 logo.jpg blob: 51d22 draw.js 7e8b1 commit tree: a10b3 parent: nil author: Fird committer: Matthew message: Major refactoring of the web content. c67db blob <html> <body></body> </html> 9ab16 blob //Some more javascript var renderSize 51d22 blob 7D 8D B3 7F BD 12 9F E9 7B 78 9D 3F 5C A6 72 CB 8d162 Friday, January 25, 13
  56. tree tree: 7e8b1 web blob: 9ab16 index.html a10b3 tree blob:

    8d162 logo.jpg blob: 51d22 draw.js 7e8b1 commit tree: a10b3 parent: nil author: Fird committer: Matthew message: Major refactoring of the web content. c67db blob <html> <body></body> </html> 9ab16 blob //Some more javascript var renderSize 51d22 blob 7D 8D B3 7F BD 12 9F E9 7B 78 9D 3F 5C A6 72 CB 8d162 Friday, January 25, 13
  57. tree tree: 7e8b1 web blob: 9ab16 index.html a10b3 tree blob:

    8d162 logo.jpg blob: 51d22 draw.js 7e8b1 commit tree: a10b3 parent: nil author: Fird committer: Matthew message: Major refactoring of the web content. c67db blob <html> <body></body> </html> 9ab16 blob //Some more javascript var renderSize 51d22 blob 7D 8D B3 7F BD 12 9F E9 7B 78 9D 3F 5C A6 72 CB 8d162 Friday, January 25, 13
  58. tree tree: 7e8b1 web blob: 9ab16 index.html a10b3 tree blob:

    8d162 logo.jpg blob: 51d22 draw.js 7e8b1 commit tree: a10b3 parent: nil author: Fird committer: Matthew message: Major refactoring of the web content. c67db blob <html> <body></body> </html> 9ab16 blob //Some more javascript var renderSize 51d22 blob 7D 8D B3 7F BD 12 9F E9 7B 78 9D 3F 5C A6 72 CB 8d162 Friday, January 25, 13
  59. tree tree: 7e8b1 web blob: 9ab16 index.html a10b3 tree blob:

    8d162 logo.jpg blob: 51d22 draw.js 7e8b1 commit tree: a10b3 parent: nil author: Fird committer: Matthew message: Major refactoring of the web content. c67db blob <html> <body></body> </html> 9ab16 blob //Some more javascript var renderSize 51d22 blob 7D 8D B3 7F BD 12 9F E9 7B 78 9D 3F 5C A6 72 CB 8d162 Friday, January 25, 13
  60. tree tree: 7e8b1 web blob: 9ab16 index.html a10b3 tree blob:

    8d162 logo.jpg blob: 51d22 draw.js 7e8b1 commit tree: a10b3 parent: nil author: Fird committer: Matthew message: Major refactoring of the web content. c67db blob <html> <body></body> </html> 9ab16 blob //Some more javascript var renderSize 51d22 blob 7D 8D B3 7F BD 12 9F E9 7B 78 9D 3F 5C A6 72 CB 8d162 Friday, January 25, 13
  61. tree tree: 7e8b1 web blob: 9ab16 index.html a10b3 tree blob:

    8d162 logo.jpg blob: 51d22 draw.js 7e8b1 commit tree: a10b3 parent: nil author: Fird committer: Matthew message: Major refactoring of the web content. c67db blob <html> <body></body> </html> 9ab16 blob //Some more javascript var renderSize 51d22 blob 7D 8D B3 7F BD 12 9F E9 7B 78 9D 3F 5C A6 72 CB 8d162 Friday, January 25, 13
  62. tree tree: 7e8b1 web blob: 9ab16 index.html a10b3 tree blob:

    8d162 logo.jpg blob: 51d22 draw.js 7e8b1 commit tree: a10b3 parent: nil author: Fird committer: Matthew message: Major refactoring of the web content. c67db blob <html> <body></body> </html> 9ab16 blob //Some more javascript var renderSize 51d22 blob 7D 8D B3 7F BD 12 9F E9 7B 78 9D 3F 5C A6 72 CB 8d162 Friday, January 25, 13
  63. tree tree: 7e8b1 web blob: 9ab16 index.html a10b3 tree blob:

    8d162 logo.jpg blob: 51d22 draw.js 7e8b1 commit tree: a10b3 parent: nil author: Fird committer: Matthew message: Major refactoring of the web content. c67db blob <html> <body></body> </html> 9ab16 blob //Some more javascript var renderSize 51d22 blob 7D 8D B3 7F BD 12 9F E9 7B 78 9D 3F 5C A6 72 CB 8d162 Friday, January 25, 13
  64. v1 v2 v3 commit tree: 9a87b parent: nil author: Fird

    committer: Matthew message: Major refactoring of the Javascript rendering engine. c67db commit tree: b22c1 parent: c67db author: Tim committer: Fird message: Minor update to HTML 9bd21 commit tree: b22c1 parent: 9bd21 author: Johnny committer: Joe message: New language transations 1c2d7 Friday, January 25, 13
  65. v1 v2 v3 commit tree: 9a87b parent: nil author: Fird

    committer: Matthew message: Major refactoring of the Javascript rendering engine. c67db commit tree: b22c1 parent: c67db author: Tim committer: Fird message: Minor update to HTML 9bd21 commit tree: b22c1 parent: 9bd21 author: Johnny committer: Joe message: New language transations 1c2d7 Friday, January 25, 13
  66. v1 v2 v3 commit tree: 9a87b parent: nil author: Fird

    committer: Matthew message: Major refactoring of the Javascript rendering engine. c67db commit tree: b22c1 parent: c67db author: Tim committer: Fird message: Minor update to HTML 9bd21 commit tree: b22c1 parent: 9bd21 author: Johnny committer: Joe message: New language transations 1c2d7 Friday, January 25, 13
  67. v1 v2 v3 commit tree: 9a87b parent: nil author: Fird

    committer: Matthew message: Major refactoring of the Javascript rendering engine. c67db commit tree: b22c1 parent: c67db author: Tim committer: Fird message: Minor update to HTML 9bd21 commit tree: b22c1 parent: 9bd21 author: Johnny committer: Joe message: New language transations 1c2d7 Friday, January 25, 13
  68. v1 v2 v3 commit tree: 9a87b parent: nil author: Fird

    committer: Matthew message: Major refactoring of the Javascript rendering engine. c67db commit tree: b22c1 parent: c67db author: Tim committer: Fird message: Minor update to HTML 9bd21 commit tree: b22c1 parent: 9bd21 author: Johnny committer: Joe message: New language transations 1c2d7 Friday, January 25, 13
  69. v1 v2 v3 commit tree: 9a87b parent: nil author: Fird

    committer: Matthew message: Major refactoring of the Javascript rendering engine. c67db commit tree: b22c1 parent: c67db author: Tim committer: Fird message: Minor update to HTML 9bd21 commit tree: b22c1 parent: 9bd21 author: Johnny committer: Joe message: New language transations 1c2d7 Friday, January 25, 13
  70. v1 v2 v3 commit tree: 9a87b parent: nil author: Fird

    committer: Matthew message: Major refactoring of the Javascript rendering engine. c67db commit tree: b22c1 parent: c67db author: Tim committer: Fird message: Minor update to HTML 9bd21 commit tree: b22c1 parent: 9bd21 author: Johnny committer: Joe message: New language transations 1c2d7 Friday, January 25, 13
  71. v1 v2 v3 commit tree: 9a87b parent: nil author: Fird

    committer: Matthew message: Major refactoring of the Javascript rendering engine. c67db commit tree: b22c1 parent: c67db author: Tim committer: Fird message: Minor update to HTML 9bd21 commit tree: b22c1 parent: 9bd21 author: Johnny committer: Joe message: New language transations 1c2d7 Friday, January 25, 13
  72. RELEASE_1.0 HEAD bug979branch commit c67db commit 9bd21 commit 1c2d7 commit

    8c2d1 commit 1bdcd commit 2daa1 Friday, January 25, 13
  73. RELEASE_1.0 HEAD bug979branch commit c67db commit 9bd21 commit 1c2d7 commit

    8c2d1 commit 1bdcd commit 2daa1 Friday, January 25, 13
  74. RELEASE_1.0 HEAD bug979branch commit c67db commit 9bd21 commit 1c2d7 commit

    8c2d1 commit 1bdcd commit 2daa1 Friday, January 25, 13
  75. RELEASE_1.0 HEAD bug979branch commit c67db commit 9bd21 commit 1c2d7 commit

    8c2d1 commit 1bdcd commit 2daa1 Friday, January 25, 13
  76. RELEASE_1.0 HEAD bug979branch commit c67db commit 9bd21 commit 1c2d7 commit

    8c2d1 commit 1bdcd commit 2daa1 Friday, January 25, 13
  77. RELEASE_1.0 HEAD bug979branch commit c67db commit 9bd21 commit 1c2d7 commit

    8c2d1 commit 1bdcd commit 2daa1 Friday, January 25, 13
  78. There’s more http://git.io/D51kRA https://joind.in/7777 Friday, January 25, 13