Gitfrom Novice to Expert         goddyzhao<goddy128@gmail.com>
Git      to Expert        goddyzhao<goddy128@gmail.com>
Abstract
Abstract★ Part I > Git Basic
Abstract★ Part I > Git Basic★ Part II > Git Internals
Git BasicGit vs SVN
Git BasicGit
Git BasicDon’t think of it in a ‘like (insertfavorite SCM system), but...’context, but more like a reallyinteresting file s...
Git Internals
Git Internals• >git init
Git Internals• >git init• >git add
Git Internals• >git init• >git add• >git commit
Git Internals• >git init• >git add• >git commit• >git branch
Git Internals• >git init     • >git tag• >git add• >git commit• >git branch
Git Internals• >git init     • >git tag• >git add      • >git merge• >git commit• >git branch
Git Internals• >git init     • >git tag• >git add      • >git merge• >git commit   • >git rebase• >git branch
Git Internals• >git init     • >git tag• >git add      • >git merge• >git commit   • >git rebase• >git branch   • >git ...
How to Use    These Git Commands
✓ to UseHow    These Git Commands
How These Git Commands             Works
How These Git Commands             Works                      ?
Before That
SoulGit
Git Object
Git Object• {Blob}
Git Object• {Blob}• {Tree}
Git Object• {Blob}• {Tree}• {Commit}
Git Object• {Blob}• {Tree}• {Commit}• {Tag}
Git Object• {Blob}• {Tree}     imm• {Commit}                 uta                       ble• {Tag}
{Blob}
{Blob}
{Blob}         +
{Blob}         +   Header
{Blob}         +   Header
{Blob}         +   Header
{Blob}         +   Header
{Blob}         +   Header
{Blob}File Content            +   Header
{Blob}File Content +            +   Header
{Blob}File Content + Header      +   Header
{Blob}File Content + Header      +   Header
{Blob}File Content + Header      +   Header         SHA-1
{Blob}File Content + Header      +   Header         SHA-1
{Blob}File Content + Header          +   Header         SHA-1       Zlib::Deflate
{Blob}File Content + Header         SHA-1       Zlib::Deflate
{Blob}File Content + Header         SHA-1       Zlib::Deflate
{Blob}File Content + Header         SHA-1       Zlib::Deflate
{Blob}File Content + Header         SHA-1       Zlib::Deflate
{Blob}File Content + Header         SHA-1          SHA-1: abd9...9       Zlib::Deflate
{Blob}File Content + Header         SHA-1          SHA-1: abd9...9       Zlib::Deflate
{Blob}File Content + Header         SHA-1          SHA-1: abd9...9       Zlib::Deflate
{Blob}File Content + Header         SHA-1          SHA-1: abd9...9       Zlib::Deflate
{Blob}File Content + Header         SHA-1          SHA-1: abd9...9                           objects/ab       Zlib::Deflate
{Blob}File Content + Header         SHA-1          SHA-1: abd9...9                           objects/ab       Zlib::Deflate
{Blob}File Content + Header         SHA-1          SHA-1: abd9...9                           objects/ab       Zlib::Deflate...
{Tree}
{Tree}
{Tree}
{Commit}
{Commit}
{Commit}
{Tag}
{Tag}Reference to Specific Commit
{Tag}Reference to Specific Commit
Relationships
Relationships
Example
Example
Example
Example
ExampleChange base_include.rb
ExampleChange base_include.rb
Example
ExampleChange init.rb
ExampleChange init.rb
Branching & Merging
Branching & Merging
Branching & Merging
Branching & Merging
Branching & MergingCreate a branch
Branching & MergingCreate a branch
Branching & Merging
Branching & MergingSwitch to another branch
Branching & MergingSwitch to another branch
Branching & Merging
Branching & MergingMerge one branch into another
Branching & MergingMerge one branch into another
Remote
Remote
Remote
Remote
Remote
Git + SVN
Thanks!
Upcoming SlideShare
Loading in...5
×

Git: from Novice to Expert

1,496

Published on

Share about git internal mechanism about how git commands such as git init, git add ,git commit, git branch etc. work!
This is also my reading notes of these two books --- <<git>> and <<pro>>

Published in: Technology
0 Comments
5 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
1,496
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
34
Comments
0
Likes
5
Embeds 0
No embeds

No notes for slide
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • &amp;#x521D;&amp;#x59CB;&amp;#x5316;&amp;#x4E00;&amp;#x4E2A;git&amp;#x5DE5;&amp;#x7A0B;&amp;#xFF0C;&amp;#x968F;&amp;#x540E;&amp;#x65B0;&amp;#x589E;&amp;#x52A0;&amp;#x4E00;&amp;#x4E2A;&amp;#x6587;&amp;#x4EF6;&amp;#xFF0C;&amp;#x7136;&amp;#x540E;&amp;#x67E5;&amp;#x770B; refs/master -&gt; objects/\n
  • &amp;#x521D;&amp;#x59CB;&amp;#x5316;&amp;#x4E00;&amp;#x4E2A;git&amp;#x5DE5;&amp;#x7A0B;&amp;#xFF0C;&amp;#x968F;&amp;#x540E;&amp;#x65B0;&amp;#x589E;&amp;#x52A0;&amp;#x4E00;&amp;#x4E2A;&amp;#x6587;&amp;#x4EF6;&amp;#xFF0C;&amp;#x7136;&amp;#x540E;&amp;#x67E5;&amp;#x770B; refs/master -&gt; objects/\n
  • &amp;#x521D;&amp;#x59CB;&amp;#x5316;&amp;#x4E00;&amp;#x4E2A;git&amp;#x5DE5;&amp;#x7A0B;&amp;#xFF0C;&amp;#x968F;&amp;#x540E;&amp;#x65B0;&amp;#x589E;&amp;#x52A0;&amp;#x4E00;&amp;#x4E2A;&amp;#x6587;&amp;#x4EF6;&amp;#xFF0C;&amp;#x7136;&amp;#x540E;&amp;#x67E5;&amp;#x770B; refs/master -&gt; objects/\n
  • &amp;#x521D;&amp;#x59CB;&amp;#x5316;&amp;#x4E00;&amp;#x4E2A;git&amp;#x5DE5;&amp;#x7A0B;&amp;#xFF0C;&amp;#x968F;&amp;#x540E;&amp;#x65B0;&amp;#x589E;&amp;#x52A0;&amp;#x4E00;&amp;#x4E2A;&amp;#x6587;&amp;#x4EF6;&amp;#xFF0C;&amp;#x7136;&amp;#x540E;&amp;#x67E5;&amp;#x770B; refs/master -&gt; objects/\n
  • &amp;#x521D;&amp;#x59CB;&amp;#x5316;&amp;#x4E00;&amp;#x4E2A;git&amp;#x5DE5;&amp;#x7A0B;&amp;#xFF0C;&amp;#x968F;&amp;#x540E;&amp;#x65B0;&amp;#x589E;&amp;#x52A0;&amp;#x4E00;&amp;#x4E2A;&amp;#x6587;&amp;#x4EF6;&amp;#xFF0C;&amp;#x7136;&amp;#x540E;&amp;#x67E5;&amp;#x770B; refs/master -&gt; objects/\n
  • &amp;#x521D;&amp;#x59CB;&amp;#x5316;&amp;#x4E00;&amp;#x4E2A;git&amp;#x5DE5;&amp;#x7A0B;&amp;#xFF0C;&amp;#x968F;&amp;#x540E;&amp;#x65B0;&amp;#x589E;&amp;#x52A0;&amp;#x4E00;&amp;#x4E2A;&amp;#x6587;&amp;#x4EF6;&amp;#xFF0C;&amp;#x7136;&amp;#x540E;&amp;#x67E5;&amp;#x770B; refs/master -&gt; objects/\n
  • &amp;#x521D;&amp;#x59CB;&amp;#x5316;&amp;#x4E00;&amp;#x4E2A;git&amp;#x5DE5;&amp;#x7A0B;&amp;#xFF0C;&amp;#x968F;&amp;#x540E;&amp;#x65B0;&amp;#x589E;&amp;#x52A0;&amp;#x4E00;&amp;#x4E2A;&amp;#x6587;&amp;#x4EF6;&amp;#xFF0C;&amp;#x7136;&amp;#x540E;&amp;#x67E5;&amp;#x770B; refs/master -&gt; objects/\n
  • &amp;#x521D;&amp;#x59CB;&amp;#x5316;&amp;#x4E00;&amp;#x4E2A;git&amp;#x5DE5;&amp;#x7A0B;&amp;#xFF0C;&amp;#x968F;&amp;#x540E;&amp;#x65B0;&amp;#x589E;&amp;#x52A0;&amp;#x4E00;&amp;#x4E2A;&amp;#x6587;&amp;#x4EF6;&amp;#xFF0C;&amp;#x7136;&amp;#x540E;&amp;#x67E5;&amp;#x770B; refs/master -&gt; objects/\n
  • &amp;#x521D;&amp;#x59CB;&amp;#x5316;&amp;#x4E00;&amp;#x4E2A;git&amp;#x5DE5;&amp;#x7A0B;&amp;#xFF0C;&amp;#x968F;&amp;#x540E;&amp;#x65B0;&amp;#x589E;&amp;#x52A0;&amp;#x4E00;&amp;#x4E2A;&amp;#x6587;&amp;#x4EF6;&amp;#xFF0C;&amp;#x7136;&amp;#x540E;&amp;#x67E5;&amp;#x770B; refs/master -&gt; objects/\n
  • &amp;#x521D;&amp;#x59CB;&amp;#x5316;&amp;#x4E00;&amp;#x4E2A;git&amp;#x5DE5;&amp;#x7A0B;&amp;#xFF0C;&amp;#x968F;&amp;#x540E;&amp;#x65B0;&amp;#x589E;&amp;#x52A0;&amp;#x4E00;&amp;#x4E2A;&amp;#x6587;&amp;#x4EF6;&amp;#xFF0C;&amp;#x7136;&amp;#x540E;&amp;#x67E5;&amp;#x770B; refs/master -&gt; objects/\n
  • &amp;#x6F14;&amp;#x793A;&amp;#xFF1A;&amp;#x589E;&amp;#x52A0;&amp;#x4E00;&amp;#x4E2A;&amp;#x6587;&amp;#x4EF6;&amp;#x5939;&amp;#xFF0C;&amp;#x968F;&amp;#x540E;&amp;#x518D;&amp;#x589E;&amp;#x52A0;&amp;#x4E00;&amp;#x4E2A;&amp;#x6587;&amp;#x4EF6;&amp;#xFF0C;&amp;#x67E5;&amp;#x770B; objects\n
  • &amp;#x6F14;&amp;#x793A;&amp;#xFF1A;&amp;#x589E;&amp;#x52A0;&amp;#x4E00;&amp;#x4E2A;&amp;#x6587;&amp;#x4EF6;&amp;#x5939;&amp;#xFF0C;&amp;#x968F;&amp;#x540E;&amp;#x518D;&amp;#x589E;&amp;#x52A0;&amp;#x4E00;&amp;#x4E2A;&amp;#x6587;&amp;#x4EF6;&amp;#xFF0C;&amp;#x67E5;&amp;#x770B; objects\n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • Transcript of "Git: from Novice to Expert"

    1. 1. Gitfrom Novice to Expert goddyzhao<goddy128@gmail.com>
    2. 2. Git to Expert goddyzhao<goddy128@gmail.com>
    3. 3. Abstract
    4. 4. Abstract★ Part I > Git Basic
    5. 5. Abstract★ Part I > Git Basic★ Part II > Git Internals
    6. 6. Git BasicGit vs SVN
    7. 7. Git BasicGit
    8. 8. Git BasicDon’t think of it in a ‘like (insertfavorite SCM system), but...’context, but more like a reallyinteresting file system! by Linus
    9. 9. Git Internals
    10. 10. Git Internals• >git init
    11. 11. Git Internals• >git init• >git add
    12. 12. Git Internals• >git init• >git add• >git commit
    13. 13. Git Internals• >git init• >git add• >git commit• >git branch
    14. 14. Git Internals• >git init • >git tag• >git add• >git commit• >git branch
    15. 15. Git Internals• >git init • >git tag• >git add • >git merge• >git commit• >git branch
    16. 16. Git Internals• >git init • >git tag• >git add • >git merge• >git commit • >git rebase• >git branch
    17. 17. Git Internals• >git init • >git tag• >git add • >git merge• >git commit • >git rebase• >git branch • >git ...
    18. 18. How to Use These Git Commands
    19. 19. ✓ to UseHow These Git Commands
    20. 20. How These Git Commands Works
    21. 21. How These Git Commands Works ?
    22. 22. Before That
    23. 23. SoulGit
    24. 24. Git Object
    25. 25. Git Object• {Blob}
    26. 26. Git Object• {Blob}• {Tree}
    27. 27. Git Object• {Blob}• {Tree}• {Commit}
    28. 28. Git Object• {Blob}• {Tree}• {Commit}• {Tag}
    29. 29. Git Object• {Blob}• {Tree} imm• {Commit} uta ble• {Tag}
    30. 30. {Blob}
    31. 31. {Blob}
    32. 32. {Blob} +
    33. 33. {Blob} + Header
    34. 34. {Blob} + Header
    35. 35. {Blob} + Header
    36. 36. {Blob} + Header
    37. 37. {Blob} + Header
    38. 38. {Blob}File Content + Header
    39. 39. {Blob}File Content + + Header
    40. 40. {Blob}File Content + Header + Header
    41. 41. {Blob}File Content + Header + Header
    42. 42. {Blob}File Content + Header + Header SHA-1
    43. 43. {Blob}File Content + Header + Header SHA-1
    44. 44. {Blob}File Content + Header + Header SHA-1 Zlib::Deflate
    45. 45. {Blob}File Content + Header SHA-1 Zlib::Deflate
    46. 46. {Blob}File Content + Header SHA-1 Zlib::Deflate
    47. 47. {Blob}File Content + Header SHA-1 Zlib::Deflate
    48. 48. {Blob}File Content + Header SHA-1 Zlib::Deflate
    49. 49. {Blob}File Content + Header SHA-1 SHA-1: abd9...9 Zlib::Deflate
    50. 50. {Blob}File Content + Header SHA-1 SHA-1: abd9...9 Zlib::Deflate
    51. 51. {Blob}File Content + Header SHA-1 SHA-1: abd9...9 Zlib::Deflate
    52. 52. {Blob}File Content + Header SHA-1 SHA-1: abd9...9 Zlib::Deflate
    53. 53. {Blob}File Content + Header SHA-1 SHA-1: abd9...9 objects/ab Zlib::Deflate
    54. 54. {Blob}File Content + Header SHA-1 SHA-1: abd9...9 objects/ab Zlib::Deflate
    55. 55. {Blob}File Content + Header SHA-1 SHA-1: abd9...9 objects/ab Zlib::Deflate d9...9
    56. 56. {Tree}
    57. 57. {Tree}
    58. 58. {Tree}
    59. 59. {Commit}
    60. 60. {Commit}
    61. 61. {Commit}
    62. 62. {Tag}
    63. 63. {Tag}Reference to Specific Commit
    64. 64. {Tag}Reference to Specific Commit
    65. 65. Relationships
    66. 66. Relationships
    67. 67. Example
    68. 68. Example
    69. 69. Example
    70. 70. Example
    71. 71. ExampleChange base_include.rb
    72. 72. ExampleChange base_include.rb
    73. 73. Example
    74. 74. ExampleChange init.rb
    75. 75. ExampleChange init.rb
    76. 76. Branching & Merging
    77. 77. Branching & Merging
    78. 78. Branching & Merging
    79. 79. Branching & Merging
    80. 80. Branching & MergingCreate a branch
    81. 81. Branching & MergingCreate a branch
    82. 82. Branching & Merging
    83. 83. Branching & MergingSwitch to another branch
    84. 84. Branching & MergingSwitch to another branch
    85. 85. Branching & Merging
    86. 86. Branching & MergingMerge one branch into another
    87. 87. Branching & MergingMerge one branch into another
    88. 88. Remote
    89. 89. Remote
    90. 90. Remote
    91. 91. Remote
    92. 92. Remote
    93. 93. Git + SVN
    94. 94. Thanks!
    1. A particular slide catching your eye?

      Clipping is a handy way to collect important slides you want to go back to later.

    ×