Git Going With DVCS v1.5.2

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

    Favorites, Groups & Events

    Git Going With DVCS v1.5.2 - Presentation Transcript

    1. Git going with DVCS mental spoo n bending 50 minutes of v ia source c ode control by Matthew McCullough of Ambient Ideas, LLC
    2. What? Why? Basic Use GUI DVCS Who? Theory Sharing Interop High Points
    3. “ Git -noun sant or Slang. an unplea British cont emptible per son ” ionar y -Oxfo rd English Dict
    4. otistical b astard, and “ I'm an eg I name all my projects after myself. Fi rst Linux, now git. ” -Lin us Torvalds
    5. darcs Mercurial Bazaar BitKeeper Subversion Perforce Clear Source Case Safe CVS PVCS RCS Folders
    6. t Source Code Control Gi
    7. CultureChange
    8. Centralized VCS =Don’t
    9. Distributed VCS = Whatever! Do
    10. Innovate Experiment Safely Be Wrong Drive-by Assist Crowd Source
    11. Crowd Source
    12. Download binaries
    13. Git Distro Sources Win Cygwin Win msysGit Linux Source Linux Package manager Mac MacPorts Mac git-osx-installer Any JGit
    14. Put it in your path
    15. Identify yourself
    16. Global Git Settings git config --global user.name \"Hal Smith\" git config --global user.email \"hal@bnl.com\"
    17. Use it!
    18. Creating a Repo mkdir myproj.git cd myproj.git git init
    19. Just show it to me!
    20. Certified Git User
    21. 145+ Commands
    22. Follow the DOTS
    23. Symmetric
    24. subversion server developer A developer B
    25. ch ec ki n
    26. te da up
    27. n ki ec ch
    28. up da te
    29. Symmetric
    30. Distributed
    31. developer A developer B
    32. blessed repo developer A developer B
    33. commit commit commit commit commit commit commit
    34. delete delete
    35. rebase
    36. pu sh
    37. pu sh
    38. push
    39. push
    40. pull
    41. pull
    42. Distributed
    43. WorkingOffline
    44. More available connectivity
    45. More demand to work without connectivity
    46. Offline Anything Checkin Add Branch List change log Grep history Rewrite history Stash Merge Label Remove practically everything but push
    47. Cool! Another commit to my latest OSS project using Git! I liked subversion better...
    48. What? Why? Basic Use GUIs DVCS Who? Theory Sharing Interop High Points
    49. Who’s Got Git?
    50. GUIs
    51. GitX
    52. GitSafe
    53. GitK
    54. GitGUI
    55. EGit
    56. c i a l ! O f fi It ’s
    57. UsageModels
    58. Centralized Central Repo
    59. Repo Blessed Dictatorship
    60. Certified Integration Managed Development Repo Repo
    61. Mirror Mirror Certified Development Repo Repo Mirrored
    62. ☚ Private Public ☛ Customized GitHub Custom + Public Contrib
    63. Hashes and Git
    64. Index vs Hash ‣ Centralized VCS uses DB sequential index.
    65. Index vs Hash ‣ Git uses SHA-1 hash.
    66. ght thou re I ashe s we h for wor ds? p ass
    67. SHA-1 Hash ‣ Different goals. ‣ Hash for the sake of integrity. ‣ Hash for the sake of identity.
    68. 40 hex characters
    69. Use as little of it as is unique
    70. Treeish
    71. Shorthand for the hashes
    72. 9AB223
    73. 9AB223^
    74. 9AB223..56CD77
    75. HEAD
    76. HEAD^
    77. HEAD~3
    78. ve b seen B ut I’ ring new hea ash abo ut h ision s... coll
    79. 49 to m s rt h a e a
    80. 46 S H A 1
    81. 22 s ta rs
    82. 20 g ra in s s an d
    83. 19 l is io n c o l
    84. Hashable Objects ‣ Blob ‣ Tree ‣ Commit ‣ Tag
    85. http://book.git-scm.com/1_the_git_object_model.html
    86. Hash Benefits Integrity ‣ Identifies damaged repos. ‣ Prevents modification of published history. ‣ Unique to file size and contents.
    87. Hash Benefits Tags ‣ Cryptographically sign tags by GPG. ‣ Guarantee repo’s state at a point in time.
    88. Storage Mechanics
    89. Typical SCMs use delta storage
    90. CVS / Subversion / darcs / Mercurial
    91. Checkin ckin kin in Chec kin he ck ec C he in in Ch C ck k C he h ec kin C ec ec kin Delta storage gets slower Ch the Ch as history of a file gets longerin Checkin Check
    92. Git uses DAG storage
    93. Directed Acyclic Graph
    94. Copy of the entire tree per checkin
    95. cp -r srcfolder srcfolder.prev
    96. Sounds inefficient...
    97. zlib deflates every blob at commit
    98. I’ve had a 400MB Subversion repo convert to a 70MB Git repo
    99. Speed
    100. git: git hg: mercurial bzr: bazaar
    101. 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
    102. bazaar numbers subversion = plus network latency
    103. 10 to 100 times Faster
    104. Location,Location,Location
    105. Three Stage Thinking of Git
    106. Git ‣ git add ‣ git commit ‣ git push
    107. ‣ Commits only what is added to the index. ‣ Opportunity to rewrite history locally. ‣ Provides time to change your mind. ‣ Selectively share with other repos.
    108. Git ‣ git stash ‣ git stash apply
    109. ‣ Save work-in-progress temporarily, but safely. ‣ Merge stashed modifications back in.
    110. Remote is like a special Stash Repo git clone git checkout edit experiment files git stash test buggy files Index git stash apply Working git add git commit git push
    111. repo git clone git://somedomain/myproj.git B uild cd myproj.git dex pda te in git checkout master U echo ‘//Comments’ >> ClassOne.java or king echo ‘//Thoughts’ >> ClassTwo.java E dit w to i ndex git add ClassOne.java Add epo ave to r git commit -m’Added comments’ S st ash git stash Pus h to
    112. Merge & Rebase
    113. Cheap Branches git branch newbranch git checkout -b newer remote/branchnm
    114. Cheap Branches git show-branch --all git branch -a
    115. ‣Local branch ‣localbranchname ‣Remote branch ‣remote/branchname
    116. Merge Anything git merge --no-commit <sourcebranch> git merge --squash <sourcebranch> git merge <sourcebranch1> <sourcebranch2>
    117. Rebase for Clarity git checkout myfeaturebranch git rebase master
    118. Rebase for Clarity ‣Fast forwards the “side” branch. ‣Reposition your feature branch’s start point. ‣See “how trunk will act” before you merge. ‣Makes for simpler merge graphs. ‣Cleaner history than a merge.
    119. ard Bra d n e ta g a32 n ch S er Master/Trunk/MainLatest d19 M 2e2 e69 8b3 erge M 9f1
    120. Bra sing a32 n ch ba Master/Trunk/MainLatest Re 2e2 d19 8b3 e69
    121. Master/Trunk/MainLatest a32 2e2 8b3 Bra ch n d19 e69 Rebase
    122. a32 Master/Trunk/MainLatest 2e2 8b3 Bra n ch d19 d19 Me rg e e69 e69
    123. What? Why? Basic Use GUIs DVCS Who? Theory Sharing Interop High Points
    124. Sharing
    125. Serving It Up Protocols ‣ GIT ‣ SSH ‣ SCP ‣ Local file system ‣ SAMBA ‣ HTTP ‣ WebDAV ‣ rsync
    126. aem on git clone git://somehost.org/myproj.git g it d git clone mccm06@somehost.org:myproj.git SSH git clone http://somehost.org/myproj.git H TTP sys tem git clone ~/work/myproj.git File rk d rive Ne two git clone z:\\someserver\\myproj.git
    127. Serving It Up ‣ 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.
    128. SVN Interop
    129. Subversion git svn clone http://unfurl.com/trunk git svn dcommit
    130. Subversion ‣ First class compatibility. ‣ Round trip support. ‣ Git commits = svn commits.
    131. Migration ‣ git svn clone
    132. Migration ‣ Power off your Subversion server.
    133. 3 reasons
    134. Cherry Pick ❸ ‣git cherry-pick a5b2ee ‣Merge in just one commit.
    135. Search History ❷ ‣git grep SomeText HEAD^^^ ‣Search blob contents history without checkouts.
    136. Bisect Bugs ❶ ‣git bisect run mvn test ‣Binary-search for bug. ‣Manual or automated modes.
    137. emerging Control System Version
    138. Twitter @matthewmccull Matthew Blog http://www.ambientideas.com/blog sidebar has all my social media links Email matthewm@ambientideas.com GitHub http://github.com/matthewmccullough
    139. 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
    140. 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
    141. 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
    142. 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/

    + Matthew McCulloughMatthew McCullough, 6 months ago

    custom

    658 views, 0 favs, 0 embeds more stats

    Git presentation to the Utah Java Users Group (UJUG more

    More info about this document

    © All Rights Reserved

    Go to text version

    • Total Views 658
      • 658 on SlideShare
      • 0 from embeds
    • Comments 0
    • Favorites 0
    • Downloads 16
    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