Your SlideShare is downloading. ×
Why we love git (CPOSC 2012)
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Saving this for later?

Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime - even offline.

Text the download link to your phone

Standard text messaging rates apply

Why we love git (CPOSC 2012)

125
views

Published on

This was a 50 minute talk I gave at CPOSC (http://cposc.org) in October 2012.

This was a 50 minute talk I gave at CPOSC (http://cposc.org) in October 2012.

Published in: Technology

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
125
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
0
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Why We Love GitJason MayWednesday, June 26, 13
  • 2. Why We Love GitWe can expressively trackcontent among multipleendpoints.Wednesday, June 26, 13
  • 3. Why We Love GitWe can expressively trackcontent among multipleendpoints.Wednesday, June 26, 13
  • 4. Why We Love GitWe can expressively trackcontent among multipleendpoints.Wednesday, June 26, 13
  • 5. Why We Love GitWe can expressively trackcontent among multipleendpoints.Wednesday, June 26, 13
  • 6. Why We Love GitWe can expressively trackcontent among multipleendpoints.Wednesday, June 26, 13
  • 7. Why We Love GitWe can expressively trackcontent among multipleendpoints.Wednesday, June 26, 13
  • 8. Commits are a form of documentation.Wednesday, June 26, 13
  • 9. Checkout states“HEAD”Wednesday, June 26, 13
  • 10. Checkout statesCommitACommitBHEADWednesday, June 26, 13
  • 11. Checkout states“HEAD”The working treeWednesday, June 26, 13
  • 12. Checkout states$ touch README.txtWednesday, June 26, 13
  • 13. Checkout states$ touch README.txt$ git status --short?? README.txtWednesday, June 26, 13
  • 14. Checkout statesCommitACommitBHEADWorking treeWednesday, June 26, 13
  • 15. Checkout statesWorking tree HEADWednesday, June 26, 13
  • 16. Checkout statesWorking tree HEAD? ? ?Wednesday, June 26, 13
  • 17. Checkout states$ git add README.txtWednesday, June 26, 13
  • 18. Checkout states$ git add README.txt$ git status --shortA README.txtWednesday, June 26, 13
  • 19. Checkout statesThe Index!Wednesday, June 26, 13
  • 20. Checkout statesCommitACommitBHEADWorking treeWednesday, June 26, 13
  • 21. Checkout statesCommitACommitBHEADWednesday, June 26, 13
  • 22. Checkout statesCommitACommitBHEADWednesday, June 26, 13
  • 23. Checkout statesCommitACommitBHEADIndexWednesday, June 26, 13
  • 24. Checkout statesWorking tree HEAD? ? ?Wednesday, June 26, 13
  • 25. Checkout statesWorking tree HEADIndexWednesday, June 26, 13
  • 26. Checkout statesWorking tree HEADIndex? ? ?Wednesday, June 26, 13
  • 27. Checkout states$ git commit -m ‘Add README.txt’Wednesday, June 26, 13
  • 28. Checkout states$ git commitWednesday, June 26, 13
  • 29. Checkout statesCommitACommitBHEADIndexREADME.txtWednesday, June 26, 13
  • 30. Checkout statesCommitACommitBIndex *commit*HEADWednesday, June 26, 13
  • 31. Checkout statesCommitACommitBIndexHEADWednesday, June 26, 13
  • 32. Checkout statesCommitACommitBIndexCommitCHEADWednesday, June 26, 13
  • 33. Checkout statesCommitACommitBIndexCommitCHEADWednesday, June 26, 13
  • 34. Checkout statesCommitACommitBCommitCHEADWednesday, June 26, 13
  • 35. The concept of a refWednesday, June 26, 13
  • 36. Checkout statesCommitACommitBCommitCHEADWednesday, June 26, 13
  • 37. Checkout states42ae0e08e0c855bc65d74f96bb37Wednesday, June 26, 13
  • 38. Checkout states42ae0e08e0c855bc65d74f96bb37 HEADWednesday, June 26, 13
  • 39. HEADWhat is a ref?Wednesday, June 26, 13
  • 40. my-branchWhat is a ref?Wednesday, June 26, 13
  • 41. origin/my-branchWhat is a ref?Wednesday, June 26, 13
  • 42. What is a ref?$ git reset HEAD^Wednesday, June 26, 13
  • 43. What is a ref?42ae0e08e0c855bc65d74f96bb37 HEAD(reset)Wednesday, June 26, 13
  • 44. What is a ref?42ae0e08e0c855bc65d74f96bb37HEAD(reset)Wednesday, June 26, 13
  • 45. RemotesWednesday, June 26, 13
  • 46. Interacting with aRemoteWednesday, June 26, 13
  • 47. Interacting with aRemoteWednesday, June 26, 13
  • 48. Interacting with aCloningRemoteWednesday, June 26, 13
  • 49. Interacting with aLocal CheckoutCloningRemoteWednesday, June 26, 13
  • 50. Interacting with a$ git clone git://HOST/repo.gitWednesday, June 26, 13
  • 51. Interacting with a$ git clone ./dir/repo.gitWednesday, June 26, 13
  • 52. Interacting with a$ git clone user@host:dir/repo.gitWednesday, June 26, 13
  • 53. Interacting with aPullingLocal Checkout RemoteWednesday, June 26, 13
  • 54. Interacting with aPullingLocal Checkout RemoteWednesday, June 26, 13
  • 55. Interacting with a$ git pull origin masterWednesday, June 26, 13
  • 56. git-fetchWednesday, June 26, 13
  • 57. git-fetchgit-mergeWednesday, June 26, 13
  • 58. master is local!origin/master is also local!Wednesday, June 26, 13
  • 59. Interacting with a$ git pull --rebase origin masterWednesday, June 26, 13
  • 60. git-fetchgit-rebaseWednesday, June 26, 13
  • 61. Checkout states42ae0e08e0c855Wednesday, June 26, 13
  • 62. Checkout states42ae0e08e0c855“base”Wednesday, June 26, 13
  • 63. Checkout states42ae0e08e0c855Wednesday, June 26, 13
  • 64. Checkout states42ae0e08e0c855f96bb37Wednesday, June 26, 13
  • 65. Checkout states42ae0e08e0c855f96bb37Wednesday, June 26, 13
  • 66. Checkout states42ae0e08e0c855bc65d74f96bb37Wednesday, June 26, 13
  • 67. Checkout states42ae0e08e0c855bc65d74f96bb37new “base”Wednesday, June 26, 13
  • 68. Checkout states42ae0e08e0c855bc65d74f96bb37Wednesday, June 26, 13
  • 69. Interacting with a$ git push origin masterWednesday, June 26, 13
  • 70. Decentralization is great, but it is still good to create astructure of authority.WorkflowWednesday, June 26, 13
  • 71. WorkflowgitoliteWednesday, June 26, 13
  • 72. WorkflowWednesday, June 26, 13
  • 73. git-flowWednesday, June 26, 13
  • 74. git-flowfeaturesWednesday, June 26, 13
  • 75. git-flow$ git flow feature start more-dotsWednesday, June 26, 13
  • 76. FEDABCdevelopfeature/more-dotsWednesday, June 26, 13
  • 77. git-flowreleasesWednesday, June 26, 13
  • 78. git-flow$ git flow release start 2.0Wednesday, June 26, 13
  • 79. FEDAdeveloprelease/2.0BCWednesday, June 26, 13
  • 80. git-flowhotfixesWednesday, June 26, 13
  • 81. git-flow$ git flow hotfix start 2.0.1Wednesday, June 26, 13
  • 82. FEDAdevelophotfix/2.0.1BCFEDAmasterWednesday, June 26, 13
  • 83. git-flowsupportWednesday, June 26, 13
  • 84. git-flow$ git flow support start 3.0Wednesday, June 26, 13
  • 85. git’s philosophyWednesday, June 26, 13
  • 86. Immutable branchesWednesday, June 26, 13
  • 87. Rewriting historyWednesday, June 26, 13
  • 88. Is history ever lost?Wednesday, June 26, 13
  • 89. The ref logWednesday, June 26, 13
  • 90. Example: git commit --amendWednesday, June 26, 13
  • 91. Git amend42ae0e08e0c855bc65d74f96bb37Wednesday, June 26, 13
  • 92. Git amend42ae0e08e0c855bc65d74f96bb37 fd0g830Wednesday, June 26, 13
  • 93. Git amend42ae0e08e0c855bc65d74f96bb37 fd0g830shows up in ref-logWednesday, June 26, 13
  • 94. Git amend42ae0e08e0c855bc65d74f96bb37 fd0g830shows up in ref-lognew HEADWednesday, June 26, 13
  • 95. When is this okay?Hasn’t been pushed upstreamPushed upstream but nobody has pulled*Wednesday, June 26, 13
  • 96. SummaryGit history is very readableConstructing commits is flexibleOrganizing commits is flexibleVirtually nothing is lostWednesday, June 26, 13