This presentation will help you get your WordPress sites, plugins, and themes under control with version control. Learn the finer points of tools like Subversion and Git. And find out how to share your code with the community for collaboration.
Presented at WordCamp Philly 2011
Put together by Dave Konopka. On Twitter: @davekonopka
- Why bother with version control?
- Tools: The options
- WordPress under control
- Workflows
- Q & A
- Work with a net
- Manage streams of work
- Collaborate (even if only with your future self)
- Synchronize between people and environments
- Commitment: You have to commit to using version control to get benefits
- Respository
- Code lines
- Commits
- Tags
- Branching, merging
- Diffs, patching
- Remotes
- WordPress is heavily invested in SVN
- WordPress code, plugin directory
- Doesn't mean you need to use SVN
- Centralized
- Must be connect to repository to work
- Slower
- Painful branching
- Popular
- 1 million users on Github
- 163K Ubuntu package installs according to popcon
- Included with OSX dev tools
- Github
- Linux, Ruby on Rails, jQuery, etc… hosted
- Distributed
- Work disconnected
- Connect when you want
- Faster
- Shape your history
- Easy branching
- Command line is your friend, learn there if you can then go gui
- Git is a collection of command line tools
- .git folder
- Clone
- Staging area
- Remotes
- Push/pull
- Clone = install
- Push from dev, pull on server
- Each plugin is an SVN repo
- Latest trunk or specified tag zipped up every 15 minutes
- git-svn
- Use diff tool to apply changes to SVN checkout
- Publish to Github for additional exposure
- Site is a repo
- Master = WordPress code
- MySite branch = customizations
- SVN externals
- Git submodules
- Ignore dynamic pieces
- wp-content/uploads
- wp-config.php
- etc…
- Workflow of applying WordPress updates
- Checkout master, delete all files, post code
- Commit
- Checkout working branch, merge in master
- WordPress on Github
- Patches
- Github
- Fork a repo
- Go wild in your fork
- Submit pull requests
- Gists
- Manual pull on server
- Remote git repo, push updates code
- Capistrano, Chef
- Post commit hooks
- Version control does not serve databases well
- Mysqldump, track script
- Plugins for managing data/content migration
- Keep public branches clean, be thoughtful with commits
- Branch all the time
- Feature branch
- Create a branch
- Commit as often as you want
- Once ready to ship, clean up the branch history
- Merge in a single, or a few, clean atomic commits
- Github
- Hosted Git repos, free public repos
- Collaboration & projest management tools
- Beanstalk
- Hosted Subversion, Git repos
- Collaboration & project management tools
- Philly based company
- BitBucket
- Unlimited free private respositories
- Unfuddle
- Hosted Subversion, Git repos
- Free private repos
- Collaboration & project management tools
- Beanstalk Guides "Everything you need to get started with Subversion or Git."
- Github Help
- Version Control with Subversion free book
- The Git Community Book
- Pro Git free book
- Git Magic
- Think Like (a) Git
- git ready
- Git Is Simpler Than You Think
- WordPress Codex: Using Subversion
- RapidSVN Cross platform SVN gui
- Versions OS X SVN gui
- TortoiseSVN Windows SVN tool
- GitX (L) OS X Git gui
- Github for Mac OS X Git gui
- TortoiseGit Windows Git tool