Subversion, github, etc.. version control systems/repositories

I’m developing WP as a heavily bespoke CMS. One of the five plugins required is already 2500 lines of code and isn’t quite finished.

I work between two machines – my laptop and my home PC.

Read More

Generally, my working method involves FileZilla and Notepad++. I log on to whichever machine I need to use; download all of /wp-content/ from server to machine and then carry on work.

This is quite a quick method of doing things, but it’s poorly documented and fraught with risks of overwriting the wrong changes, etc.

I’ve heard subversion/github etc. mentioned a lot, and I notice that most serious developers use them, but I have no idea what they are or where to get started.

What are the benefits of using such systems?

How do I go about getting involved?

Realistically, will they save me time in the long run?

I’ve looked at a few links but tend to disengage when the terminology starts flying over my head, so I’d appreciate some human-speak where possible. I’m quite a techy guy, PHP/SQL/JS etc, but little experience with best practice in terms of coding as I’m roughly 114% self-taught.

Many thanks,

Related posts

Leave a Reply

4 comments

  1. Dunc, glad you asked about this before it was too late for you. You have heard the right words. You are right, unfortunately the articles tutorials are not very much newbie friendly. Frist let me try to clear some terminology for you.

    The thing you need to manage your code and keep track of all the changes you make to your plugins is basically called source code management. There are many opensource and powerful source code manage systems available. Some very famous of them are: Git (not github), Subversion, Mercurial, Bzr.

    All of the above SCM (source code management) create a repository for your code and store each and every change you make to your code in that repository. You can move back to any point in history of your code when ever you like.

    Github is just a hosting service for your git repositories. Github offers free accounts but will make your code public, a good service to host your opensource applications/plugins.

    But if you don’t want to pay and want to keep your code private, then I will recommend bitbucket.org. They offer private repositories and support both mercurial and git.

    The first thing you have to do is make the choice and choose a scm. Git is very famous because of its features and Github, but I personally like both, Git and mercurial as they both have very neat features. You can also choose subversion but then you will have to host your repo on your own server or may be find some free service to host your svn repository.

    P.S You can also host your git and mercurial repos on your server.

  2. Github will document each change automatically as you push the code to your repository which is a very useful feature among a ton that Github offers. Another useful feature for public repositories are that anyone can contribute by sending you bug reports and fixed code snippets . Note that private repositories are not free as in beer, so all of your code, on a free account, will be available for everyone. If you don’t want to pay for the Github service, I suppose installing a subversion on your development machine couldn’t hurt.

  3. Get started on Github (http://help.github.com/). You’ll have an online copy of your code. This means that not only, but anyone can access it on any machine (depending on if you set it as a public or private repository). Plus it’s another backup of your code 🙂

  4. Just to put it out there: unison and similar tools allow you to synchronize folders in clever and conflict-sensitive ways.

    They do not, however, provide versioning, which svn, git and others do. It is a nice alternative to them if you do not need or want to keep all revisions ever created.