Git Going With DVCS v1.1

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    3 Favorites & 1 Group

    Git Going With DVCS v1.1 - Presentation Transcript

    1. Git going DVCS with n bending mental spoo minutes of 90 ode control ia source c v 1 by Matthew McCullough of Ambient Ideas, LLC
    2. “ Git -noun sant or unplea Slang. an British ” per son emptible cont ionar y rd English Dict -Oxfo 2
    3. astard, and otistical b “ I'm an eg projects all my I name yself. Fi rst Linux, after m git. ” now us Torvalds -Lin
    4. RCS Folders
    5. Clear Source Case Safe CVS PVCS RCS Folders
    6. Subversion BitKeeper Perforce Clear Source Case Safe CVS PVCS RCS Folders
    7. darcs Mercurial Bazaar Subversion BitKeeper Perforce Clear Source Case Safe CVS PVCS RCS Folders
    8. t Source Code Control Gi
    9. Gi Source Code Control t
    10. CultureChange 8
    11. =Don’t Centralized VCS
    12. Innovate 16
    13. Experiment 16
    14. Safely Be Wrong 16
    15. Drive-by Assist 16
    16. Crowd Source 16
    17. 18
    18. 19
    19. Global Git Settings git config --global user.name \"Hal Smith\" 20
    20. Global Git Settings git config --global user.name \"Hal Smith\" git config --global user.email \"hal@bnl.com\" 20
    21. Global Git Settings git config --global user.name \"Hal Smith\" git config --global user.email \"hal@bnl.com\" ues val ent urr tc tpu Ou git config --list 20
    22. Creating a Repo mkdir myproj.git 21
    23. Creating a Repo mkdir myproj.git cd myproj.git 21
    24. Creating a Repo mkdir myproj.git cd myproj.git lks! t fo ’s i hat git init T 21
    25. 22
    26. 22
    27. Who’s Got Git? 23
    28. Hashes and Integrity 28
    29. SHA-1 Hash Index vs. Hash ‣ Centralized VCS uses DB auto-increment index. ‣ Git uses SHA-1 hash. ‣ Hash for the sake of integrity. Hashable Objects ‣ Blob ‣ Tree ‣ Commit ‣ Tag 29
    30. SHA-1 Hash Index vs. Hash ‣ Centralized VCS uses DB auto-increment index. ‣ Git uses SHA-1 hash. ‣ Hash for the sake of integrity. Hashable Objects ght hou It ere ‣ Blob es w ash h ‣ Tree for rds? ‣ Commit swo pas ‣ Tag 29
    31. http://book.git-scm.com/1_the_git_object_model.html 30
    32. http://book.git-scm.com/1_the_git_object_model.html 30
    33. http://book.git-scm.com/1_the_git_object_model.html 30
    34. http://book.git-scm.com/1_the_git_object_model.html 30
    35. alized entr C Alice Bob
    36. alized entr C Alice Bob 1 = okay.htm
    37. alized entr C Alice Bob 1 = okay.htm 2 = fine.htm
    38. alized entr C Alice Bob 1 = okay.htm 2 = fine.htm Sync
    39. alized entr C Alice Bob 1 = okay.htm 1 = okay.htm 2 = fine.htm 2 = fine.htm Sync
    40. alized entr C Alice Bob 1 = okay.htm 1 = okay.htm 2 = fine.htm 2 = fine.htm Sync 3 = good.htm
    41. alized entr C Alice Bob 1 = okay.htm 1 = okay.htm 2 = fine.htm 2 = fine.htm Sync 3 = good.htm 3 = great.htm
    42. alized entr C Alice Bob 1 = okay.htm 1 = okay.htm 2 = fine.htm 2 = fine.htm Sync 3 = good.htm Sync 3 = great.htm
    43. alized entr C Alice Bob 1 = okay.htm 1 = okay.htm 2 = fine.htm 2 = fine.htm Sync 4 = good.htm 3 = good.htm Sync 3 = great.htm 4 = great.htm
    44. alized entr C Alice Bob 1 = okay.htm 1 = okay.htm 2 = fine.htm 2 = fine.htm Sync ERROR 4 = good.htm 3 = good.htm ERROR Sync 3 = great.htm 4 = great.htm
    45. Distributed Alice Bob
    46. Distributed Alice Bob a233b76 = okay.htm
    47. Distributed Alice Bob a233b76 = okay.htm d234ab1 = fine.htm
    48. Distributed Alice Bob a233b76 = okay.htm d234ab1 = fine.htm Sync
    49. Distributed Alice Bob a233b76 = okay.htm a233b76 = okay.htm d234ab1 = fine.htm d234ab1 = fine.htm Sync
    50. Distributed Alice Bob a233b76 = okay.htm a233b76 = okay.htm d234ab1 = fine.htm d234ab1 = fine.htm Sync f90b12c = good.htm
    51. Distributed Alice Bob a233b76 = okay.htm a233b76 = okay.htm d234ab1 = fine.htm d234ab1 = fine.htm Sync f90b12c = good.htm ae42ba0 = great.htm
    52. Distributed Alice Bob a233b76 = okay.htm a233b76 = okay.htm d234ab1 = fine.htm d234ab1 = fine.htm Sync f90b12c = good.htm Sync ae42ba0 = great.htm
    53. Distributed Alice Bob a233b76 = okay.htm a233b76 = okay.htm d234ab1 = fine.htm d234ab1 = fine.htm Sync f90b12c = good.htm f90b12c = good.htm Sync ae42ba0 = great.htm ae42ba0 = great.htm
    54. Hash Benefits Integrity ‣ Identifies damaged repos. ‣ Prevents modification of published history. ‣ Unique to file size and contents. Tags ‣ Cryptographically sign tags by GPG/email. Independence ‣ Separation from sequence # of checkin. 35
    55. Location,Location,Location 36
    56. Remote is like a special Stash Repo Index Working
    57. Remote is like a special Stash Repo Index Working
    58. Remote is like a special Stash Repo git clone Index Working
    59. Remote is like a special Stash Repo git clone git checkout Index Working
    60. Remote is like a special Stash Repo git clone git checkout edit some files Index Working
    61. Remote is like a special Stash Repo git clone git checkout edit some files git stash Index Working
    62. Remote is like a special Stash Repo git clone git checkout edit some files git stash edit some files Index Working
    63. Remote is like a special Stash Repo git clone git checkout edit some files git stash edit some files Index git stash apply Working
    64. Remote is like a special Stash Repo git clone git checkout edit some files git stash edit some files Index git stash apply Working git add
    65. Remote is like a special Stash Repo git clone git checkout edit some files git stash edit some files Index git stash apply Working git add git commit
    66. Remote is like a special Stash Repo git clone git checkout edit some files git stash edit some files Index git stash apply Working git add git commit git push
    67. Remote is like a special Stash Repo git clone git checkout edit some files git stash edit some files Index git stash apply Working git add git commit git push
    68. repo uild B git clone git://somedomain/myproj.git cd myproj.git 38
    69. repo uild B git clone git://somedomain/myproj.git cd myproj.git dex te in pda U git checkout master 38
    70. repo uild B git clone git://somedomain/myproj.git cd myproj.git dex te in pda U git checkout master king echo ‘//Comments’ >> ClassOne.java or dit w echo ‘//Thoughts’ >> ClassTwo.java E 38
    71. repo uild B git clone git://somedomain/myproj.git cd myproj.git dex te in pda U git checkout master king echo ‘//Comments’ >> ClassOne.java or dit w echo ‘//Thoughts’ >> ClassTwo.java E ndex to i Add epo git add ClassOne.java to r ave comments’ S git commit -m’Added 38
    72. repo uild B git clone git://somedomain/myproj.git cd myproj.git dex te in pda U git checkout master king echo ‘//Comments’ >> ClassOne.java or dit w echo ‘//Thoughts’ >> ClassTwo.java E ndex to i Add epo git add ClassOne.java to r ave commit -m’Added comments’ S git ash st h to stash Pus git 38
    73. Single Stage Thinking Subversion svn commit ‣ ‣ Adds everything modified. ‣ Must list if you want specific files. ‣ What if you check in your password? 39
    74. $ echo //password >> Matt1.java $ echo //password >> Matt2.java 40
    75. $ echo //password >> Matt1.java $ echo //password >> Matt2.java $ svn status M Matt1.java M Matt2.java 40
    76. $ echo //password >> Matt1.java $ echo //password >> Matt2.java $ svn status M Matt1.java M Matt2.java $ svn commit -m'Matts checkin' Adding Matt1.java Adding Matt2.java Transmitting file data . Committed revision 2. 40
    77. Three Stage Thinking Git git add ‣ git commit ‣ git push ‣ ‣ Commits only what is added to the index. ‣ Opportunity to change history locally. ‣ Selectively share with other repos. 41
    78. $ echo //SECRETPASSWORD >> mattfile1.java $ echo //NewText2 >> mattfile2.java 42
    79. $ echo //SECRETPASSWORD >> mattfile1.java $ echo //NewText2 >> mattfile2.java $ git status # On branch master # Changed but not updated: # modified: mattfile1.txt # modified: mattfile2.txt 42
    80. $ echo //SECRETPASSWORD >> mattfile1.java $ echo //NewText2 >> mattfile2.java $ git status # On branch master # Changed but not updated: # modified: mattfile1.txt # modified: mattfile2.txt dex o in int Put $ git add mattfile1.txt 42
    81. $ echo //SECRETPASSWORD >> mattfile1.java $ echo //NewText2 >> mattfile2.java $ git status # On branch master # Changed but not updated: # modified: mattfile1.txt # modified: mattfile2.txt dex o in int Put $ git add mattfile1.txt epo to r ave S $ git commit -m'Matts pw checkin' [master]: created ddcdf18: \"Matts changes\" 1 files changed, 1 insertions(+), 0 deletions(-) 42
    82. #$%^&! I just committed my password! 43
    83. Change History $ git reset --hard HEAD^ HEAD is now at 9de4cd3 First checkin $ git log commit 9de4cd3a3f24a3de3e804df84cc3321c7d0c9993 Author: Matthew McCullough <matthewm@ambientideas.com> Date: Wed Mar 4 23:09:17 2009 -0700 First checkin 44
    84. Change History mit com the way wa hro T $ git reset --hard HEAD^ HEAD is now at 9de4cd3 First checkin $ git log commit 9de4cd3a3f24a3de3e804df84cc3321c7d0c9993 Author: Matthew McCullough <matthewm@ambientideas.com> Date: Wed Mar 4 23:09:17 2009 -0700 First checkin 44
    85. Change History mit com the way wa hro T $ git reset --hard HEAD^ HEAD is now at 9de4cd3 First checkin $ git log commit 9de4cd3a3f24a3de3e804df84cc3321c7d0c9993 Author: Matthew McCullough <matthewm@ambientideas.com> Date: Wed Mar 4 23:09:17 2009 -0700 First checkin 44
    86. GitMathematics 45
    87. Directed Acyclic Graph a32 2e2 8b3 4e8
    88. Directed Acyclic Graph Ann’s Feature a32 5fa 2e2 8b3 4e8
    89. Directed Acyclic Graph Ann’s Feature a32 5fa 2e2 8b3 4e8
    90. Directed Acyclic Graph Ann’s Feature a32 5fa Tim’s Feature 2e2 d19 8b3 4e8
    91. Directed Acyclic Graph Ann’s Feature a32 5fa Tim’s Feature 2e2 d19 Linus’ rewrite of Tim’s feature 8b3 e69 4e8
    92. Directed Acyclic Graph Ann’s Feature a32 5fa Tim’s Feature 2e2 d19 Linus’ rewrite of Tim’s feature 8b3 e69 4e8
    93. WorkingOffline 47
    94. Offline Anything Checkin 48
    95. Offline Anything Checkin Add Branch List change log Grep history Rewrite history Stash Merge Label Remove 48
    96. Offline Anything Checkin Add Branch List change log Grep history Rewrite history Stash Merge Label Remove practically everything but push 48
    97. Offline Anything Checkin Add Branch List change log Grep history Rewrite history Stash Merge Label Remove practically everything but push 48
    98. Hooray! Another checkin to my latest OSS project!
    99. Hooray! Another checkin to my latest OSS project! I think I liked subversion better...
    100. UsageModels 50
    101. Centralized Central Repo
    102. Centralized Central Repo
    103. Repo Blessed Dictatorship
    104. Repo Blessed Dictatorship
    105. Repo Blessed Dictatorship
    106. Repo Blessed Dictatorship
    107. Repo Blessed Dictatorship
    108. Certified Integration Managed Development Repo Repo
    109. Certified Integration Managed Development Repo Repo
    110. Certified Integration Managed Development Repo Repo
    111. Certified Integration Managed Development Repo Repo
    112. Mirror Mirror Certified Development Repo Repo Mirrored
    113. Mirror Mirror Certified Development Repo Repo Mirrored
    114. Mirror Mirror Certified Development Repo Repo Mirrored
    115. Mirror Mirror Certified Development Repo Repo Mirrored
    116. Mirror Mirror Certified Development Repo Repo Mirrored
    117. ☚ Private Public ☛ GitHub Custom + Public Contrib
    118. ☚ Private Public ☛ GitHub Custom + Public Contrib
    119. ☚ Private Public ☛ Customized GitHub Custom + Public Contrib
    120. ☚ Private Public ☛ Customized GitHub Custom + Public Contrib
    121. ☚ Private Public ☛ Customized GitHub Custom + Public Contrib
    122. Speed 56
    123. Init Add Status Diff Branch (Cold/Hot) git hg bzr git hg bzr git hg bzr git hg bzr Tag Log Commit (Lg) Commit (Sm) git c git h hg c hg h bzr c bzr h git hg bzr git hg bzr git hg bzr git hg bzr data from http://whygitisbetterthanx.com/#git-is-fast
    124. Sharing 58
    125. Serving It Up Network ‣ git instaweb. Built in, read-only, HTTP. ‣ git daemon. Custom socket language. ‣ gitosis. Easy permissions control. ‣ github. Open source & private repos. ‣ ssh. OS controlled permissions. 59
    126. 60
    127. 61
    128. Serving It Up Filesystem ‣ Local folders. Yes, they can be “remotes.” ‣ Mapped network drives. Just like folders. 62
    129. on aem it d g git clone git://somehost.org/myproj.git 63
    130. on aem it d g git clone git://somehost.org/myproj.git SSH git clone mccm06@somehost.org:myproj.git 63
    131. on aem it d g git clone git://somehost.org/myproj.git SSH git clone mccm06@somehost.org:myproj.git TTP H git clone http://somehost.org/myproj.git 63
    132. on aem it d g git clone git://somehost.org/myproj.git SSH git clone mccm06@somehost.org:myproj.git TTP H git clone http://somehost.org/myproj.git tem sys File git clone ~/work/myproj.git 63
    133. on aem it d g git clone git://somehost.org/myproj.git SSH git clone mccm06@somehost.org:myproj.git TTP H git clone http://somehost.org/myproj.git tem sys File git clone ~/work/myproj.git rive rk d two Ne git clone z:\\someserver\\myproj.git 63
    134. VCS Interop 64
    135. Serversion git svn clone http://unfurl.com/trunk git svn dcommit ‣ First class compatibility. ‣ Round trip support. ‣ Git commits = svn commits. 65
    136. 66
    137. GUIs 67
    138. GitX 68
    139. gitSafe 69
    140. GitK 70
    141. GitGUI 71
    142. 6 reasons
    143. Cherry Pick ❻ ‣git cherry-pick a5b2ee 73
    144. Cherry Pick ❻ ‣git cherry-pick a5b2ee ‣Merge in just one commit. 73
    145. Cherry Pick ❻ ‣git cherry-pick a5b2ee ‣Merge in just one commit. ‣When you want a nugget, not a branchload. 73
    146. Gives Credit ❺ ‣Tracks who authors a change. 74
    147. Gives Credit ❺ ‣Tracks who authors a change. ‣“Author” even survives passing through reviewers. 74
    148. Gives Credit ❺ ‣Tracks who authors a change. ‣“Author” even survives passing through reviewers. ‣“Author” survives all merges. 74
    149. Gives Credit ❺ ‣Tracks who authors a change. ‣“Author” even survives passing through reviewers. ‣“Author” survives all merges. ‣Additionally tracks who committed a change. 74
    150. Bisect Bugs ❹ ‣git bisect run mvn test 75
    151. Bisect Bugs ❹ ‣git bisect run mvn test ‣Binary-search for bug. 75
    152. Bisect Bugs ❹ ‣git bisect run mvn test ‣Binary-search for bug. ‣Manual or automated modes. 75
    153. Bisect Bugs ❹ ‣git bisect run mvn test ‣Binary-search for bug. ‣Manual or automated modes. ‣Yak cruelty-prevention. 75
    154. Squash Verbosity ❸ ‣git merge --squash mybranch 76
    155. Squash Verbosity ❸ ‣git merge --squash mybranch ‣Reduce all your micro-checkins to block commits. 76
    156. Squash Verbosity ❸ ‣git merge --squash mybranch ‣Reduce all your micro-checkins to block commits. ‣Make mistakes, revise, checkin without hesitation. 76
    157. Squash Verbosity ❸ ‣git merge --squash mybranch ‣Reduce all your micro-checkins to block commits. ‣Make mistakes, revise, checkin without hesitation. ‣Great for SVN compatibility. 76
    158. Search History ❷ ‣git grep SomeText HEAD^^^ 77
    159. Search History ❷ ‣git grep SomeText HEAD^^^ ‣Search in file history without checkout. 77
    160. Search History ❷ ‣git grep SomeText HEAD^^^ ‣Search in file history without checkout. ‣Greps contents. 77
    161. Rebase ❶ ‣git rebase master 78
    162. Rebase ❶ ‣git rebase master ‣Reposition your feature branch’s start point. 78
    163. Rebase ❶ ‣git rebase master ‣Reposition your feature branch’s start point. ‣Makes for simpler merge graphs. 78
    164. Rebase ❶ ‣git rebase master ‣Reposition your feature branch’s start point. ‣Makes for simpler merge graphs. ‣Sustains feature-branch work clarity. 78
    165. 79
    166. Tomorrow’s VCS, Today
    167. tthew Ma Twitter @matthewmccull Blog http://www.ambientideas.com/blog sidebar has all my social media links Email matthewm@ambientideas.com GitHub http://github.com/matthewmccullough 81
    168. Resources Git Homepage http://git-scm.com Directed Acrylic Graph http://en.wikipedia.org/wiki/Directed_acyclic_graph Git for Computer Scientists http://eagain.net/articles/git-for-computer-scientists/ Git Treeish http://book.git-scm.com/4_git_treeishes.html 82
    169. Resources Git Docs http://www.kernel.org/pub/software/scm/git/docs/ Git Magic eBook http://www-cs-students.stanford.edu/~blynn/gitmagic/book.pdf Linus Torvald’s Git talk at Google http://www.youtube.com/watch?v=4XpnKHJAok8 CygWin http://www.cygwin.com 83
    170. Resources MSysGit http://code.google.com/p/msysgit Git Cheetah http://code.google.com/p/msysgit/wiki/GitCheetah Matthew’s Git Bookmarks http://delicious.com/matthew.mccullough/git Matthew’s Bash Prompt http://gist.github.com/47267 84
    171. Image Credits ‣ http://www.ambientideasphotography.com ‣ http://flickr.com/photos/lenore-m/2903856664/ ‣ http://en.wikipedia.org/wiki/Git_(software) ‣ http://flickr.com/photos/karenhorton/1583513014/ ‣ http://flickr.com/photos/mashdnart/2545782407/ ‣ http://commons.wikimedia.org/wiki/ File:Small_Boy_nuclear_test_1962.jpg ‣ http://www.flickr.com/photos/knmurphy/2506896257/ ‣ http://www.flickr.com/photos/albyspace/1022035568/ ‣ http://flickr.com/photos/michaelhays/3070238360/ ‣ http://flickr.com/photos/d_vdm/509996632/ 85

    + Matthew McCulloughMatthew McCullough, 8 months ago

    custom

    563 views, 3 favs, 0 embeds more stats

    Matthew McCullough's presentation of Git, the new D more

    More info about this document

    © All Rights Reserved

    Go to text version

    • Total Views 563
      • 563 on SlideShare
      • 0 from embeds
    • Comments 0
    • Favorites 3
    • Downloads 0
    Most viewed embeds

    more

    All embeds

    less

    Flagged as inappropriate Flag as inappropriate
    Flag as inappropriate

    Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

    Cancel
    File a copyright complaint
    Having problems? Go to our helpdesk?

    Categories