An Introduction to Using Version Control with Drupal Kathleen Murtagh Design 4 Drupal -- June 14, 2009
Why use Version Control? <ul><li>Constant  backup  of your project
Full  history  of your project's development
Reuse code  that was previously removed
Remove  changes that caused bugs
Enable  collaborative   development
Easier  deployment  to production </li></ul>
Typical Workflow <ul><li>Make your  changes
Review  your edits
Commit </li></ul>Rinse and Repeat!
Commits are Patches Multiple developers can  work on the same file
View Your Commit History <ul><li>See your  coworker's work
Understand  the rational behind changes
Recapture  a block of code that was removed </li></ul>
Change Versions of your Code (Don't be scared of this command line screen shot.  I'll show you the graphical apps later) <...
Find the commit  that caused a bug </li></ul>
Remove Commits <ul><li>Find the commit  that caused a bug
Revert the commit  in whole or in part
???
Profit! </li></ul>...
Upcoming SlideShare
Loading in …5
×

Intro To Version Control

704 views

Published on

Provides an absolute beginner\'s guide to how version control works, why you should switch and how to get started. Note that this presentation was for Design 4 Drupal, so it is angled towards Drupal themers.

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

  • Be the first to like this

No Downloads
Views
Total views
704
On SlideShare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
12
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Intro To Version Control

  1. 1. An Introduction to Using Version Control with Drupal Kathleen Murtagh Design 4 Drupal -- June 14, 2009
  2. 2. Why use Version Control? <ul><li>Constant backup of your project
  3. 3. Full history of your project's development
  4. 4. Reuse code that was previously removed
  5. 5. Remove changes that caused bugs
  6. 6. Enable collaborative development
  7. 7. Easier deployment to production </li></ul>
  8. 8. Typical Workflow <ul><li>Make your changes
  9. 9. Review your edits
  10. 10. Commit </li></ul>Rinse and Repeat!
  11. 11. Commits are Patches Multiple developers can work on the same file
  12. 12. View Your Commit History <ul><li>See your coworker's work
  13. 13. Understand the rational behind changes
  14. 14. Recapture a block of code that was removed </li></ul>
  15. 15. Change Versions of your Code (Don't be scared of this command line screen shot. I'll show you the graphical apps later) <ul><li>Test previous versions of your project
  16. 16. Find the commit that caused a bug </li></ul>
  17. 17. Remove Commits <ul><li>Find the commit that caused a bug
  18. 18. Revert the commit in whole or in part
  19. 19. ???
  20. 20. Profit! </li></ul>...
  21. 21. Branching and Tagging Branches <ul><li>Fork code to allow independent development
  22. 22. A Working branch for significant feature changes
  23. 23. Create new or different versions of a project </li></ul>
  24. 24. Branching and Tagging Tags <ul><li>Snapshots that are not intended to be modified
  25. 25. Record significant moments </li><ul><li>Releases, Stable versions, Testing results, etc </li></ul></ul>
  26. 26. The Version Control Systems Centralized Repository <ul><li>SVN (Subversion)
  27. 27. CVS (Concurrent Versions System) </li></ul>Notable Features <ul><li>All branches and tags are shared
  28. 28. Linear development </li></ul>
  29. 29. The Version Control Systems Decentralized Repository <ul><li>Git
  30. 30. Bazaar </li></ul>Notable Features <ul><li>Offline development
  31. 31. Enables shared and personal branches and tags
  32. 32. Sophisticated merging
  33. 33. More complicated </li></ul>
  34. 34. Front-end Tools for Subversion <ul><li>Windows </li><ul><li>TortoiseSVN </li></ul><li>Mac </li><ul><li>Versions </li></ul><li>Cross platform </li><ul><li>SmartSVN
  35. 35. RapidSVN </li></ul></ul>It would be advantageous to your career as a web developer to learn the command line, though!
  36. 36. TortoiseSVN (Windows)
  37. 37. Versions (Mac)
  38. 38. SmartSVN
  39. 39. RapidSVN
  40. 40. Start Using Subversion Start with version controlling your theme Think about the database problem later
  41. 41. Set Up Subversion <ul><li>Set up a repository </li></ul><ul><ul><li>Use a service to manage your repo
  42. 42. Setup a repo with your web host
  43. 43. Install Subversion on your server </li></ul></ul><ul><li>Install the SVN client </li></ul><ul><ul><li>If you develop on a remote server , install it there </li><ul><li>Your remote server may already have it installed! </li></ul><li>If you develop locally , install it on your computer </li></ul></ul>
  44. 44. Start Using Your Repository <ul><li>Experiment with interface options to find what you like the best
  45. 45. Import your theme into the repository
  46. 46. Checkout your theme into the themes directory
  47. 47. Start making changes and committing </li></ul>
  48. 48. Keep Learning.

×