Your SlideShare is downloading. ×
0
Embracing Distributed Version Control How to Drastically Improve Collaboration, Experimentation, Productivity, Freedom, Fl...
Lets Talk About It <ul><li>Open Forum  </li></ul><ul><ul><li>Ask questions </li></ul></ul><ul><ul><li>Ask for demonstratio...
What's the Big Deal? <ul><ul><li>Tools should mold to your process </li></ul></ul><ul><ul><li>Projects have lots of indepe...
The Basics  
Centralized Version Control Systems <ul><ul><li>One centralized server with the revision database </li></ul></ul><ul><ul><...
Distributed Version Control Systems <ul><ul><li>Every client has a full revision history locally </li></ul></ul><ul><ul><u...
Different to the Core
How Did We Get Here Again? <ul><li>  </li></ul>
There Can Only Be One... or maybe two <ul><ul><li>Everyone has their own opinions </li></ul></ul><ul><ul><li>In the end ch...
Lets Take a Walk... Side by Side SVN GIT Obtain Code svn checkout <url> git clone <url> Add Files svn add file1.php *.css ...
Branching  
I've Branched Before... So What? <ul><ul><li>With CVCS branching is used to separate major releases </li></ul></ul><ul><ul...
Branching is Hard... Or is it? <ul><li>Tasks </li></ul><ul><ul><li>Obtain the source code </li></ul></ul><ul><ul><li>Creat...
Branching is Hard... Or is it? <ul><li>  </li></ul><ul><li>  </li></ul><ul><li>       REPO=http://svn.php.net/repository/p...
Branching is Hard... Or is it? <ul><li>  </li></ul><ul><ul><li>git clone git://github.com/php/php-src.git   (3 minutes)   ...
OK. So Branching Is Easy... Now What? <ul><ul><li>Cheap and easy branching fundamentally changes the way you approach deve...
Every Change Has Its Place in a Branch <ul><li>You can use any branching style you choose. Here's an example: </li></ul><u...
 
Workflow  
Your Centralized Workflow <ul><li>With Centralized Version Control Systems, your workflow will always look like this. </li...
Chose Your Own Adventure Workflow <ul><li>With Distributed Version Control Systems you can morph your workflow to meet you...
Or It Can Work Like This... <ul><li>Integration Manager Approach </li></ul><ul><ul><li>Useful for small to large teams </l...
Or It Can Work Like This... <ul><li>Dictator and Lieutenants </li></ul><ul><ul><li>Useful for large teams </li></ul></ul><...
Migration & Integration  
Dipping Your Toes in the Water <ul><ul><li>Use your favorite DVCS with most other VCS repositories </li></ul></ul><ul><ul>...
Diving in Head First <ul><ul><li>Import entire history/branches from legacy systems </li></ul></ul><ul><ul><li>Rinse & rep...
References <ul><li>GIT  </li></ul><ul><ul><li>http://git-scm.com/course/svn.html </li></ul></ul><ul><ul><li>http://whygiti...
Get In Touch <ul><li>Nowell Strite </li></ul><ul><ul><li>Twitter: nowells </li></ul></ul><ul><ul><li>Email: nowell@strite....
Upcoming SlideShare
Loading in...5
×

Embracing Distributed Version Control

1,381

Published on

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
1,381
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
10
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Transcript of "Embracing Distributed Version Control"

  1. 1. Embracing Distributed Version Control How to Drastically Improve Collaboration, Experimentation, Productivity, Freedom, Flexibility, Data Integrity and take two strokes off of your golf game
  2. 2. Lets Talk About It <ul><li>Open Forum </li></ul><ul><ul><li>Ask questions </li></ul></ul><ul><ul><li>Ask for demonstrations  </li></ul></ul><ul><ul><li>Add opinions </li></ul></ul><ul><ul><li>Share experiences </li></ul></ul><ul><ul><li>Try it yourself </li></ul></ul>
  3. 3. What's the Big Deal? <ul><ul><li>Tools should mold to your process </li></ul></ul><ul><ul><li>Projects have lots of independent features </li></ul></ul><ul><ul><li>Feature isolation </li></ul></ul><ul><ul><li>&quot;Major Milestone&quot; vs. &quot;Release Often&quot; </li></ul></ul><ul><ul><li>&quot;Only commit when its done&quot; is limiting </li></ul></ul>
  4. 4. The Basics  
  5. 5. Centralized Version Control Systems <ul><ul><li>One centralized server with the revision database </li></ul></ul><ul><ul><ul><li>single point of failure </li></ul></ul></ul><ul><ul><li>Clients checkout a working copy to their machine </li></ul></ul><ul><ul><li>Most operations happen on the server </li></ul></ul><ul><ul><li>Checkouts/Updates happen one directory at a time </li></ul></ul><ul><ul><li>Linear revision history (merges squash commits) </li></ul></ul><ul><ul><li>Every directory contains a &quot;special folder&quot; </li></ul></ul><ul><li>  </li></ul>
  6. 6. Distributed Version Control Systems <ul><ul><li>Every client has a full revision history locally </li></ul></ul><ul><ul><ul><li># backups == # clients  </li></ul></ul></ul><ul><ul><ul><li>no need to be online </li></ul></ul></ul><ul><ul><li>All operations are local (except sharing) </li></ul></ul><ul><ul><li>Non-linear revision history </li></ul></ul><ul><ul><li>Network operations are compressed into packed downloads </li></ul></ul><ul><ul><li>Working copy is independent of versioning system </li></ul></ul>
  7. 7. Different to the Core
  8. 8. How Did We Get Here Again? <ul><li>  </li></ul>
  9. 9. There Can Only Be One... or maybe two <ul><ul><li>Everyone has their own opinions </li></ul></ul><ul><ul><li>In the end choose what system fits best </li></ul></ul><ul><ul><ul><li>but whatever you do, choose a DVCS (at least for your local development) </li></ul></ul></ul><ul><ul><li>Today we will compare SVN and GIT </li></ul></ul>
  10. 10. Lets Take a Walk... Side by Side SVN GIT Obtain Code svn checkout <url> git clone <url> Add Files svn add file1.php *.css git add file1.php *.css Status svn status git status Differences svn diff | less git diff Restore File svn revert <path> git checkout <path> Commit All Changes svn commit git commit -a Get Latest Updates svn update git pull Share Latest Edits git push
  11. 11. Branching  
  12. 12. I've Branched Before... So What? <ul><ul><li>With CVCS branching is used to separate major releases </li></ul></ul><ul><ul><li>Branching is always followed by merging </li></ul></ul><ul><ul><li>Both tasks need to be easy and inexpensive </li></ul></ul>
  13. 13. Branching is Hard... Or is it? <ul><li>Tasks </li></ul><ul><ul><li>Obtain the source code </li></ul></ul><ul><ul><li>Create Branch </li></ul></ul><ul><ul><li>Switch Branch </li></ul></ul><ul><ul><li>Merge Branch </li></ul></ul>
  14. 14. Branching is Hard... Or is it? <ul><li>  </li></ul><ul><li>  </li></ul><ul><li>      REPO=http://svn.php.net/repository/php/php-src/ </li></ul><ul><ul><li>svn checkout $REPO/trunk  (10 minutes) </li></ul></ul><ul><ul><li>svn copy $REPO/branches/PHP_5_3 $REPO/branches/PHP_5_5  (4 minutes) </li></ul></ul><ul><ul><li>svn switch $REPO/branches/PHP_5_5   (50 seconds) </li></ul></ul><ul><ul><li>svn merge -r 20:HEAD $REPO/branches/PHP_5_3 (claw your eyes out) </li></ul></ul><ul><li>  </li></ul><ul><li>Total Time: ~15 minutes + clawing your eyes out  </li></ul><ul><li>Total Time Branching: ~5 minutes </li></ul><ul><li>  </li></ul>
  15. 15. Branching is Hard... Or is it? <ul><li>  </li></ul><ul><ul><li>git clone git://github.com/php/php-src.git  (3 minutes)   </li></ul></ul><ul><ul><li>git branch PHP_5_5 origin/PHP_5_3  (5 milliseconds) </li></ul></ul><ul><ul><li>git checkout PHP_5_5   (2 seconds) </li></ul></ul><ul><ul><li>git merge origin/PHP_5_3   (1 second) </li></ul></ul><ul><li>  </li></ul><ul><li>Total Time: ~3 minutes </li></ul><ul><li>Total Time Branching: ~3 seconds </li></ul>
  16. 16. OK. So Branching Is Easy... Now What? <ul><ul><li>Cheap and easy branching fundamentally changes the way you approach development </li></ul></ul><ul><ul><li>Everything is done on a branch </li></ul></ul><ul><ul><li>Issue isolation is now a reality </li></ul></ul>
  17. 17. Every Change Has Its Place in a Branch <ul><li>You can use any branching style you choose. Here's an example: </li></ul><ul><ul><li>master </li></ul></ul><ul><ul><ul><li>also referred to as trunk </li></ul></ul></ul><ul><ul><li>hotfix-X </li></ul></ul><ul><ul><ul><li>quick fixes to master </li></ul></ul></ul><ul><ul><li>develop </li></ul></ul><ul><ul><ul><li>integration point for all completed feature branches </li></ul></ul></ul><ul><ul><li>feature-Y </li></ul></ul><ul><ul><ul><li>every discreet issue is worked on in a feature branch </li></ul></ul></ul>complete walk-through: http://nvie.com/git-model
  18. 19. Workflow  
  19. 20. Your Centralized Workflow <ul><li>With Centralized Version Control Systems, your workflow will always look like this. </li></ul>image source: http://whygitisbetterthanx.com
  20. 21. Chose Your Own Adventure Workflow <ul><li>With Distributed Version Control Systems you can morph your workflow to meet your needs. You can do it the same... </li></ul>image source: http://whygitisbetterthanx.com
  21. 22. Or It Can Work Like This... <ul><li>Integration Manager Approach </li></ul><ul><ul><li>Useful for small to large teams </li></ul></ul><ul><ul><li>Integration manager merges all feature branches into mainline </li></ul></ul>
  22. 23. Or It Can Work Like This... <ul><li>Dictator and Lieutenants </li></ul><ul><ul><li>Useful for large teams </li></ul></ul><ul><ul><li>Team Leaders curate new feature branches into production ready state </li></ul></ul><ul><ul><li>Dictator has final say and merged into mainline </li></ul></ul>
  23. 24. Migration & Integration  
  24. 25. Dipping Your Toes in the Water <ul><ul><li>Use your favorite DVCS with most other VCS repositories </li></ul></ul><ul><ul><li>Push and Pull changes between systems  </li></ul></ul>
  25. 26. Diving in Head First <ul><ul><li>Import entire history/branches from legacy systems </li></ul></ul><ul><ul><li>Rinse & repeat: make you have everything before you switch </li></ul></ul>
  26. 27. References <ul><li>GIT </li></ul><ul><ul><li>http://git-scm.com/course/svn.html </li></ul></ul><ul><ul><li>http://whygitisbetterthanx.com/ </li></ul></ul><ul><ul><li>http://nvie.com/git-model/  </li></ul></ul><ul><ul><li>http://progit.org/book/  </li></ul></ul><ul><ul><li>http://gitref.org/  </li></ul></ul><ul><ul><li>http://gitready.com/ </li></ul></ul><ul><li>  </li></ul><ul><li>Mercurial </li></ul><ul><ul><li>http://hginit.com/ </li></ul></ul>
  27. 28. Get In Touch <ul><li>Nowell Strite </li></ul><ul><ul><li>Twitter: nowells </li></ul></ul><ul><ul><li>Email: nowell@strite.org </li></ul></ul><ul><li>  </li></ul><ul><li>Matthew Weier O'Phinney </li></ul><ul><ul><li>Twitter: weierophinney </li></ul></ul><ul><ul><li>Email: matthew@weierophinney.net </li></ul></ul>
  1. A particular slide catching your eye?

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

×