Wordpress version control

2,051 views

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
2,051
On SlideShare
0
From Embeds
0
Number of Embeds
399
Actions
Shares
0
Downloads
4
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Wordpress version control

  1. 1. Version Control for the Uninitiated A presentation by David M. Doolin for WordPress Out Of (version) Control Tuesday, May 31, 2011 6:00 PM Automattic Lounge 711 The Embarcadero San Francisco, CA dool.in 1 © 2011, Inventium SystemsTuesday, May 31, 2011 1
  2. 2. Bona Fides • Who am I? • Consulting: Interdisciplinary science and engineering software development. • Inventium Systems: hibernating. • Website In A Weekend: Pivoting out of internet-space into local-space; working with Tech Liminal, Oakland. • Landing page: dool.in I’ve used version control, starting with Concurrent Version System (CVS), since 1997. I’ve operated my own CVS repository, and I manage several remotely hosted Subversion (SVN) repositories. I have too many projects on Github. dool.in 2 © 2011, Inventium SystemsTuesday, May 31, 2011 2
  3. 3. Quick overview • What is version control? • Why you need version control. • Version control tools Subversion and Git. • Learning version control. All this in 12 minutes or less! Disclaimer: this presentation was designed for entertainment purposes only, and abounds in vague generalizations, spurious analogies and metaphors which don’t. Use common sense. Verify the information in this presentation from original sources. Do not cite. Thank you. dool.in 3 © 2011, Inventium SystemsTuesday, May 31, 2011 3
  4. 4. What is version control? • A suite of software methodologies. • Keeps track of changes in files. Forever. • Promotes collaboration between people across time and space. • A philosophy for software engineering. IMPORTANT: Version control is its own thing No metaphor, analogy, figure of speech, long winded explanation or slide deck can adequately convey modern version control. You have to do it for yourself. dool.in 4 © 2011, Inventium SystemsTuesday, May 31, 2011 4
  5. 5. Almost 40 years of version control... 1974: Source Code Control System (SCCS). (Written in SNOBOL4!) 1982: Revision Control System (RCS). 1986: Concurrent Version System, (CVS). 2000: Subversion 2005: Git When I first looked in to this version control thing, I asked a Real Hacker “Which one, CVS or SCCS, should I learn?” His reply: “Learn both, then choose for yourself.” dool.in 5 © 2011, Inventium SystemsTuesday, May 31, 2011 5
  6. 6. Why use version control? "Its a good idea." - Sarah Allen • Collaboration with yourself & others across time. • Collaboration with yourself & others across space. • Automatic revisioning. You don’t have to dream up (and remember) some hair-brained scheme for organizing revisions of all your files. (“What was the name of that last file?”) dool.in 6 © 2011, Inventium SystemsTuesday, May 31, 2011 6
  7. 7. Version Control - What you need to know • Version control is leverage for collaboration. People can easily work separated by geography and time zone. • Leverage works 2 ways... • Positive leverage: A good team becomes excellent. An excellent team becomes phenomenal. • Negative leverage: Teams with problems may find those problems getting worse via version control. • Communication is key: Version control enhances collaborator’s ability to communicate. Version control does NOT replace communication Version control is not magic pixie dust. dool.in 7 © 2011, Inventium SystemsTuesday, May 31, 2011 7
  8. 8. (CVS) Subversion at-a-glance Beau Pete Ma.tt Subversion operates from a centralized repository http://core.trac.wordpress.org/browser • CVS is sort of like C, Which makes Subversion (“a better CVS”) sort of like C++. • SVN: Use for any text or binary file: LaTeX, WordPress source code, images, this presentation, &c. dool.in 8 © 2011, Inventium SystemsTuesday, May 31, 2011 8
  9. 9. Git at-a-glance dool.in 9 © 2011, Inventium SystemsTuesday, May 31, 2011 9
  10. 10. Git after your first week Unicorns courtesy of Cornify dool.in 10 © 2011, Inventium SystemsTuesday, May 31, 2011 10
  11. 11. “Yes, but how does git feel...?” Jazz lover’s guide to Git versus SVN • SVN Closed hole flute: Easier to play, sound quality good. Not as cool. • Git Open hole flute: Harder to play, more flexible (microtones, glissados, etc), sound quality superb. Ineffably cooler. dool.in 11 © 2011, Inventium SystemsTuesday, May 31, 2011 11
  12. 12. Centralized versus distributed repository Git like distributed Ma.tt cans of worms You Me Pete Me SVN root Image courtesy Coaching to Greatness Ma.tt SVN like the mighty oak You Beau dool.in 12 © 2011, Inventium SystemsTuesday, May 31, 2011 12
  13. 13. Some pros and cons Pros Cons • Branching (subtree checkout) remotely is • Global commits. easier. • Centralized repository. • Easier to organize unrelated projects. SVN Handles large numbers of unrelated • More prone to conflicts. • projects with ease. • Easier to bork local checkout. • Only commit branch you’re working on. • Local commits; reduces conflicts. • Project promiscuity. • Deployment can be trivial, host git repo on • Must commit whole tree. server, commit and push. Eliminates rsync. • Difficult to check out subtree Git (this is a problem for WP theme • Handles large complicated projects with and plugin development). ease. (Designed for Linux kernel dev.) • Nacin, Jaquith, Mall, etc. • Cannot commit stub (empty) directory. SVN evolved. Git was designed. dool.in 13 © 2011, Inventium SystemsTuesday, May 31, 2011 13
  14. 14. Git Project Proliferation (not that cute) Git’s distributed repository model can induce large numbers of small projects. This is surprisingly inconvenient for WordPress plugin and theme development. Be wary of project overindulgence. Starting with Git, It all seems so innocent But projects seem to proliferate :( Creating projects is simple, easy & fun! dool.in 14 © 2011, Inventium SystemsTuesday, May 31, 2011 14
  15. 15. Which one is better, Git or Subversion? 1st: There is no one-size-fits-all tool which is “better” than every other tool. 2d: Git and Subversion are going to be around a long, long time. The closer you are to developers, the more likely you’re going to learn both anyway. 3d: If your main interest is WordPress development, learn Subversion now. Yesterday. Seriously. Then learn Git. 4th: If you’re riding Rails, you probably already know you need to learn Git. Mandatory. My opinion: if you work with information, you won’t escape learning version control. It’s inevitable. dool.in 15 © 2011, Inventium SystemsTuesday, May 31, 2011 15
  16. 16. Bruce Lee’s Kung Fu guide to learning version control 1. Novice stage: At first, version control is just “version control.” Get a repository, make some changes, save the changes. 2. Practitioner stage: Committing, pushing, rebasing, rolling back, branching, merging, moving, renaming... the pros and cons of a dozen systems to explore. 3. Mastery stage: Version control is just version control. It’s easy and fun! Image courtesy Wikipedia Don’t wait. Start learning version control now. dool.in 16 © 2011, Inventium SystemsTuesday, May 31, 2011 16
  17. 17. With a little help from... so cool. portable motivation. ‘Cause version control is a little like voodoo, doncha know. dool.in 17 © 2011, Inventium SystemsTuesday, May 31, 2011 17
  18. 18. Find this presentation on Slideshare dool.in 18 © 2011, Inventium SystemsTuesday, May 31, 2011 18

×