Using Subversion 2

Terminal

Share
Using Subversion

Hey

After looking into how to configure websites and the like. I came across a cool way of downloading and keeping files upto date on your computer. It is called subversion. People from Unix, and Linux background know what I am talking about. Subversion is a method in which to download files, from Terminal, into a folder. It is mostly used for remote access but you can use it on your own computer as well. This example will use WordPress, although it can be used on any site that has a repository, mostly open source sites.

This first step is to open up Terminal and change your directory to a temporary directory which you can play with. You can use the following command.

cd /Users//Desktop

The folder can be any one you want. After this you need to make a new temp folder (unless you have navigated to one already). This is done with the make directory command. The dot in front of the slash is very useful if you want to save time in writing long path names.

mkdir ./temp

This temp file has been made, you can every view it in Finder. This step is very important. Make sure you change your directory into the temp folder. Other wise the subversion command will copy everything into the folder you are in.

cd ./temp

We are now ready to roll. This command will copy the latest version across to your computer. Simply type:

svn co http://svn.automattic.com/wordpress/trunk/ .

The svn command will copy every single file within the trunk folder to the folder specified. This means that you have the latest copy which you can use and abuse. You can now play with this version, test it, find bugs and report back to the developers. This helps them a lot with finding bugs etc.

Every so often this trunk file will be updated with new files. You will obviously want these files so you can use the next command. This will check your files against the ones on your computer and download any ones that have changed or been added. You do need to change you directory to the one you want to update.

svn up

Most open source sites have svn repositories. It is just a matter of looking for them and finding the right web address.


If you want to keep up with the latests post from Mac Tricks And Tips I recommend you subscribe to the RSS Feed.

Where To Next?

  • Subscribe To Mac Tricks And Tips

2 Responses to “Using Subversion”

  1. 1

    Nice introduction.

    If you want to go a little deeper I can recommend the following tutorial:

    http://www.rubyrobot.org/tutorial/subversion-with-mac-os-x

    It’s also written for mac users

    Comment By Stefan on June 1st, at 11:20 pm

  2. 2

    Good stuff.

    Just a few nit-picks.

    Subversion is version control system, not a method for transferring files nor used for remote access.

    For the record many windows users know about SVN as well :)

    Comment By Balls on June 2nd, at 8:44 pm