WordCamp Philly: WordPress & Version Control

Dave Konopa talked about how to get control of WordPress with version control in the second session at WordCamp Philly. Version control gives you a safety net you can step back to at any time. It allows you to manage different streams of development work. This lets you simultaneously develop new features while still patching existing bugs.

By creating a documented history of code changes it makes synchronization and collaboration much easier. It all requires commitment, though. You need to do it every day so that you don’t end up with a haphazard project.

The two big options: subversion and git. Subversion is a centralized repository system while git is a distributed version control tool.

With git, when you’re ready to share you code you can push all your changes to a remote repository. You can clone a repository and also create a staging area for intermediate work.

The easiest implementation of version control for WordPress is custom plugins and themes. While you could use version control to manage your entire site it’s probably more than you need unless you’re working on a significantly large site.

If you’re a git fan but want to stay up on the recent changes to the WordPress code base it’s all mirror through a Github repository that Mark Jaquith set up. It’s synced every 30 minutes so you can keep up with anything that’s coming down the pipe.

Dave’s last bit of advice was to learn by trying. The best way to learn how to use version control effectively is to use it. Get a plugin up on Github, experiment with things, and have fun. The slides from the talk are all available on Github.